ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleBase::Integral Class Reference

#include <math_integral.h>

Collaboration diagram for ModuleBase::Integral:

Public Member Functions

 Integral ()
 ~Integral ()

Static Public Member Functions

static void Simpson_Integral (const int mesh, const double *const func, const double *const rab, double &asum)
 Simpson integration with a radial Jacobian.
static void Simpson_Integral (const int mesh, const double *const func, const double dr, double &asum)
 Simpson integration on a uniform grid.
static void Simpson_Integral_0toall (const int mesh, const double *const func, const double *const rab, double *const asum)
 Cumulative integration from the first grid point.
static void Simpson_Integral_alltoinf (const int mesh, const double *const func, const double *const rab, double *const asum)
 Tail integrals computed as total minus prefix.
static double simpson (const int n, const double *const f, const double dx)
 Numerical integration on an evenly-spaced grid using Simpson's rule.
static double simpson (const int n, const double *const f, const double *const h)
 Numerical integration on an irregularly-spaced grid using Simpson's rule.
static void Gauss_Legendre_grid_and_weight (const int n, double *x, double *weights)
static void Gauss_Legendre_grid_and_weight (const double xmin, const double xmax, const int n, double *x, double *weights)

Static Public Attributes

static const double Lebedev_Laikov_grid110_x [110]
static const double Lebedev_Laikov_grid110_y [110]
static const double Lebedev_Laikov_grid110_z [110]
static const double Lebedev_Laikov_grid110_w [110]

Constructor & Destructor Documentation

◆ Integral()

ModuleBase::Integral::Integral ( )

◆ ~Integral()

ModuleBase::Integral::~Integral ( )

Member Function Documentation

◆ Gauss_Legendre_grid_and_weight() [1/2]

void ModuleBase::Integral::Gauss_Legendre_grid_and_weight ( const double xmin,
const double xmax,
const int n,
double * x,
double * weights )
static

◆ Gauss_Legendre_grid_and_weight() [2/2]

void ModuleBase::Integral::Gauss_Legendre_grid_and_weight ( const int n,
double * x,
double * weights )
static
Here is the caller graph for this function:

◆ simpson() [1/2]

double ModuleBase::Integral::simpson ( const int n,
const double *const f,
const double *const h )
static

Numerical integration on an irregularly-spaced grid using Simpson's rule.

Parameters
nnumber of grid points
ffunction values at grid points
hgrid spacing of length n-1, must be positive
Here is the call graph for this function:

◆ simpson() [2/2]

double ModuleBase::Integral::simpson ( const int n,
const double *const f,
const double dx )
static

Numerical integration on an evenly-spaced grid using Simpson's rule.

Parameters
nnumber of grid points
ffunction values at grid points
dxgrid spacing
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Simpson_Integral() [1/2]

void ModuleBase::Integral::Simpson_Integral ( const int mesh,
const double *const func,
const double *const rab,
double & asum )
static

Simpson integration with a radial Jacobian.

Parameters
mesh[in] positive odd number of grid points; mesh=1 returns zero
func[in] function to be integrated
rab[in] rab[i]=(dr/di)*Delta_i at each grid point. The index spacing Delta_i is 1.
asum[out] approximation to \int_{r[0]}^{r[mesh-1]} f(r) dr
Author
Peize Lin
Date
2017-10-02
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Simpson_Integral() [2/2]

void ModuleBase::Integral::Simpson_Integral ( const int mesh,
const double *const func,
const double dr,
double & asum )
static

Simpson integration on a uniform grid.

Parameters
mesh[in] positive odd number of grid points; mesh=1 returns zero
func[in] function to be integrated
dr[in] interval
asum[out] approximation to \int_{r[0]}^{r[mesh-1]} f(r) dr
Author
Peize Lin
Date
2017-10-02
Here is the call graph for this function:

◆ Simpson_Integral_0toall()

void ModuleBase::Integral::Simpson_Integral_0toall ( const int mesh,
const double *const func,
const double *const rab,
double *const asum )
static

Cumulative integration from the first grid point.

Parameters
mesh[in] number of grid points, mesh >= 1 (odd or even)
func[in] function to be integrated
rab[in] rab[i]=(dr/di)*Delta_i at each grid point. The index spacing Delta_i is 1.
asum[out] asum[i] \approx \int_{r[0]}^{r[i]} f(r) dr; asum[0]=0. Odd-index endpoints append one trapezoid to the preceding Simpson prefix.
Author
Peize Lin
Date
2016-02-14
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Simpson_Integral_alltoinf()

void ModuleBase::Integral::Simpson_Integral_alltoinf ( const int mesh,
const double *const func,
const double *const rab,
double *const asum )
static

Tail integrals computed as total minus prefix.

Parameters
mesh[in] number of grid points, mesh >= 1 (odd or even)
func[in] function to be integrated
rab[in] rab[i]=(dr/di)*Delta_i at each grid point. The index spacing Delta_i is 1.
asum[out] asum[i] \approx \int_{r[i]}^{r[mesh-1]} f(r) dr; no infinite-tail correction.
Author
Peize Lin
Date
2016-02-14
Here is the call graph for this function:

Member Data Documentation

◆ Lebedev_Laikov_grid110_w

const double ModuleBase::Integral::Lebedev_Laikov_grid110_w
static
Initial value:
= {
0.048107465851397, 0.048107465851397, 0.048107465851397, 0.048107465851397, 0.048107465851397, 0.048107465851397, 0.123071735281670, 0.123071735281670,
0.123071735281670, 0.123071735281670, 0.123071735281670, 0.123071735281670, 0.123071735281670, 0.123071735281670, 0.103191734088330, 0.103191734088330,
0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330,
0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330,
0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.103191734088330, 0.124945096872513, 0.124945096872513,
0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513,
0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513,
0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.124945096872513, 0.120580249028528, 0.120580249028528,
0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528,
0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528,
0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.120580249028528, 0.121830917385521, 0.121830917385521,
0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521,
0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521,
0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521, 0.121830917385521
}

◆ Lebedev_Laikov_grid110_x

const double ModuleBase::Integral::Lebedev_Laikov_grid110_x
static
Initial value:
= {
1.000000000000000, -1.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.577350269189626, -0.577350269189626,
0.577350269189626, -0.577350269189626, 0.577350269189626, -0.577350269189626, 0.577350269189626, -0.577350269189626, 0.185115635344736, -0.185115635344736,
0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736,
0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, 0.185115635344736, -0.185115635344736, 0.965124035086594, -0.965124035086594,
0.965124035086594, -0.965124035086594, 0.965124035086594, -0.965124035086594, 0.965124035086594, -0.965124035086594, 0.690421048382292, -0.690421048382292,
0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292,
0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, 0.690421048382292, -0.690421048382292, 0.215957291845848, -0.215957291845848,
0.215957291845848, -0.215957291845848, 0.215957291845848, -0.215957291845848, 0.215957291845848, -0.215957291845848, 0.395689473055942, -0.395689473055942,
0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942,
0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, 0.395689473055942, -0.395689473055942, 0.828769981252592, -0.828769981252592,
0.828769981252592, -0.828769981252592, 0.828769981252592, -0.828769981252592, 0.828769981252592, -0.828769981252592, 0.478369028812150, -0.478369028812150,
0.478369028812150, -0.478369028812150, 0.878158910604066, -0.878158910604066, 0.878158910604066, -0.878158910604066, 0.478369028812150, -0.478369028812150,
0.478369028812150, -0.478369028812150, 0.878158910604066, -0.878158910604066, 0.878158910604066, -0.878158910604066, 0.000000000000000, 0.000000000000000,
0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000
}

◆ Lebedev_Laikov_grid110_y

const double ModuleBase::Integral::Lebedev_Laikov_grid110_y
static
Initial value:
= {
0.000000000000000, 0.000000000000000, 1.000000000000000, -1.000000000000000, 0.000000000000000, 0.000000000000000, 0.577350269189626, 0.577350269189626,
-0.577350269189626, -0.577350269189626, 0.577350269189626, 0.577350269189626, -0.577350269189626, -0.577350269189626, 0.185115635344736, 0.185115635344736,
-0.185115635344736, -0.185115635344736, 0.185115635344736, 0.185115635344736, -0.185115635344736, -0.185115635344736, 0.965124035086594, 0.965124035086594,
-0.965124035086594, -0.965124035086594, 0.965124035086594, 0.965124035086594, -0.965124035086594, -0.965124035086594, 0.185115635344736, 0.185115635344736,
-0.185115635344736, -0.185115635344736, 0.185115635344736, 0.185115635344736, -0.185115635344736, -0.185115635344736, 0.690421048382292, 0.690421048382292,
-0.690421048382292, -0.690421048382292, 0.690421048382292, 0.690421048382292, -0.690421048382292, -0.690421048382292, 0.215957291845848, 0.215957291845848,
-0.215957291845848, -0.215957291845848, 0.215957291845848, 0.215957291845848, -0.215957291845848, -0.215957291845848, 0.690421048382292, 0.690421048382292,
-0.690421048382292, -0.690421048382292, 0.690421048382292, 0.690421048382292, -0.690421048382292, -0.690421048382292, 0.395689473055942, 0.395689473055942,
-0.395689473055942, -0.395689473055942, 0.395689473055942, 0.395689473055942, -0.395689473055942, -0.395689473055942, 0.828769981252592, 0.828769981252592,
-0.828769981252592, -0.828769981252592, 0.828769981252592, 0.828769981252592, -0.828769981252592, -0.828769981252592, 0.395689473055942, 0.395689473055942,
-0.395689473055942, -0.395689473055942, 0.395689473055942, 0.395689473055942, -0.395689473055942, -0.395689473055942, 0.878158910604066, 0.878158910604066,
-0.878158910604066, -0.878158910604066, 0.478369028812150, 0.478369028812150, -0.478369028812150, -0.478369028812150, 0.000000000000000, 0.000000000000000,
0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.478369028812150, -0.478369028812150,
0.478369028812150, -0.478369028812150, 0.878158910604066, -0.878158910604066, 0.878158910604066, -0.878158910604066
}

◆ Lebedev_Laikov_grid110_z

const double ModuleBase::Integral::Lebedev_Laikov_grid110_z
static
Initial value:
= {
0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 1.000000000000000, -1.000000000000000, 0.577350269189626, 0.577350269189626,
0.577350269189626, 0.577350269189626, -0.577350269189626, -0.577350269189626, -0.577350269189626, -0.577350269189626, 0.965124035086594, 0.965124035086594,
0.965124035086594, 0.965124035086594, -0.965124035086594, -0.965124035086594, -0.965124035086594, -0.965124035086594, 0.185115635344736, 0.185115635344736,
0.185115635344736, 0.185115635344736, -0.185115635344736, -0.185115635344736, -0.185115635344736, -0.185115635344736, 0.185115635344736, 0.185115635344736,
0.185115635344736, 0.185115635344736, -0.185115635344736, -0.185115635344736, -0.185115635344736, -0.185115635344736, 0.215957291845848, 0.215957291845848,
0.215957291845848, 0.215957291845848, -0.215957291845848, -0.215957291845848, -0.215957291845848, -0.215957291845848, 0.690421048382292, 0.690421048382292,
0.690421048382292, 0.690421048382292, -0.690421048382292, -0.690421048382292, -0.690421048382292, -0.690421048382292, 0.690421048382292, 0.690421048382292,
0.690421048382292, 0.690421048382292, -0.690421048382292, -0.690421048382292, -0.690421048382292, -0.690421048382292, 0.828769981252592, 0.828769981252592,
0.828769981252592, 0.828769981252592, -0.828769981252592, -0.828769981252592, -0.828769981252592, -0.828769981252592, 0.395689473055942, 0.395689473055942,
0.395689473055942, 0.395689473055942, -0.395689473055942, -0.395689473055942, -0.395689473055942, -0.395689473055942, 0.395689473055942, 0.395689473055942,
0.395689473055942, 0.395689473055942, -0.395689473055942, -0.395689473055942, -0.395689473055942, -0.395689473055942, 0.000000000000000, 0.000000000000000,
0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.000000000000000, 0.878158910604066, 0.878158910604066,
-0.878158910604066, -0.878158910604066, 0.478369028812150, 0.478369028812150, -0.478369028812150, -0.478369028812150, 0.878158910604066, 0.878158910604066,
-0.878158910604066, -0.878158910604066, 0.478369028812150, 0.478369028812150, -0.478369028812150, -0.478369028812150
}

The documentation for this class was generated from the following files: