12 namespace NumericalIntegration {
31 for (
int i = 0; i < 32; i++) {
32 for (
int j = 0; j < 32; j++) {
33 x[j] = (by - ay) / 2.*xleg[j] + (by + ay) / 2.;
34 w[j] = (by - ay) / 2.*wleg[j];
36 sum += wlag[i] * w[j] * func(xlag[i], x[j]);
43 std::vector<double> *xlagp, std::vector<double> *wlagp,
44 std::vector<double> *xlegp, std::vector<double> *wlegp) {
45 std::vector<double> &xlag = *xlagp;
46 std::vector<double> &wlag = *wlagp;
47 std::vector<double> &xleg = *xlegp;
48 std::vector<double> &wleg = *wlegp;
60 for (
int j = 0; j < 32; j++) {
61 xleg[j] = (by - ay) / 2.*xlego[j] + (by + ay) / 2.;
62 wleg[j] = (by - ay) / 2.*wlego[j];
69 std::vector<double> *xlegp1, std::vector<double> *wlegp1,
70 std::vector<double> *xlegp2, std::vector<double> *wlegp2) {
71 std::vector<double> &xleg1 = *xlegp1;
72 std::vector<double> &wleg1 = *wlegp1;
73 std::vector<double> &xleg2 = *xlegp2;
74 std::vector<double> &wleg2 = *wlegp2;
84 for (
int j = 0; j < 32; j++) {
85 xleg1[j] = (by - ay) / 2.*xlego[j] + (by + ay) / 2.;
86 wleg1[j] = (by - ay) / 2.*wlego[j];
87 xleg2[j] = (b2y - a2y) / 2.*xlego[j] + (b2y + a2y) / 2.;
88 wleg2[j] = (b2y - a2y) / 2.*wlego[j];
97 std::vector<double> &x = *xp;
98 std::vector<double> &w = *wp;
107 for (
int i = 0; i < 32; i++) {
108 w[i] = (b - a) / 2.*wlego[i];
109 x[i] = (b - a) / 2.*xlego[i] + (b + a) / 2.;
118 std::vector<double> &x = *xp;
119 std::vector<double> &w = *wp;
127 for (
int i = 0; i < 10; i++) {
128 w[i] = (b - a) / 2.*wlego[i];
129 x[i] = (b - a) / 2.*xlego[i] + (b + a) / 2.;
138 std::vector<double> &x = *xp;
139 std::vector<double> &w = *wp;
147 for (
int i = 0; i < 5; i++) {
148 w[i] = (b - a) / 2.*wlego[i];
149 x[i] = (b - a) / 2.*xlego[i] + (b + a) / 2.;
158 std::vector<double> &x = *xp;
159 std::vector<double> &w = *wp;
168 for (
int i = 0; i < 40; i++) {
169 w[i] = (b - a) / 2.*wlego[i];
170 x[i] = (b - a) / 2.*xlego[i] + (b + a) / 2.;
179 std::vector<double> &x = *xp;
180 std::vector<double> &w = *wp;
188 for (
int i = 0; i < 32; i++) {
void GetCoefsIntegrateLegendre5(double a, double b, std::vector< double > *x, std::vector< double > *w)
const double coefficients_wleg10[10]
Weights of the 10-point Gauss-Legendre quadrature.
const double coefficients_wlag32[32]
Weights of the 32-point Gauss-Laguerre quadrature.
const double coefficients_xlag32[32]
Nodes of the 32-point Gauss-Laguerre quadrature.
void GetCoefs2DLaguerre32Legendre32(double ay, double by, std::vector< double > *xlag, std::vector< double > *wlag, std::vector< double > *xleg, std::vector< double > *wleg)
void GetCoefsIntegrateLaguerre32(std::vector< double > *x, std::vector< double > *w)
const double coefficients_wleg40[40]
Weights of the 40-point Gauss-Legendre quadrature.
void GetCoefsIntegrateLegendre40(double a, double b, std::vector< double > *x, std::vector< double > *w)
const double coefficients_wleg32[32]
Weights of the 32-point Gauss-Legendre quadrature.
const double coefficients_xleg10[10]
Nodes of the 10-point Gauss-Legendre quadrature.
void GetCoefsIntegrateLegendre32(double a, double b, std::vector< double > *x, std::vector< double > *w)
const double coefficients_wleg5[5]
Weights of the 5-point Gauss-Legendre quadrature.
const double coefficients_xleg5[5]
Nodes of the 5-point Gauss-Legendre quadrature.
void GetCoefsIntegrateLegendre10(double a, double b, std::vector< double > *x, std::vector< double > *w)
void GetCoefs2DLegendre32Legendre32(double ax, double bx, double ay, double by, std::vector< double > *xleg1, std::vector< double > *wleg1, std::vector< double > *xleg2, std::vector< double > *wleg2)
double Integrate2DLaguerre32Legendre32(double(*func)(double, double), double ay, double by)
const double coefficients_xleg32[32]
Nodes of the 32-point Gauss-Legendre quadrature.
The main namespace where all classes and functions of the Thermal-FIST library reside.
const double coefficients_xleg40[40]
Nodes of the 40-point Gauss-Legendre quadrature.