40 for (
int i = 0; i < 32; i++) {
41 for (
int j = 0; j < 32; j++) {
42 x[j] = (by - ay) / 2.*xleg[j] + (by + ay) / 2.;
43 w[j] = (by - ay) / 2.*wleg[j];
45 sum += wlag[i] * w[j] * func(xlag[i], x[j]);
52 std::vector<double> *xlagp, std::vector<double> *wlagp,
53 std::vector<double> *xlegp, std::vector<double> *wlegp) {
54 std::vector<double> &xlag = *xlagp;
55 std::vector<double> &wlag = *wlagp;
56 std::vector<double> &xleg = *xlegp;
57 std::vector<double> &wleg = *wlegp;
69 for (
int j = 0; j < 32; j++) {
70 xleg[j] = (by - ay) / 2.*xlego[j] + (by + ay) / 2.;
71 wleg[j] = (by - ay) / 2.*wlego[j];
78 std::vector<double> *xlegp1, std::vector<double> *wlegp1,
79 std::vector<double> *xlegp2, std::vector<double> *wlegp2) {
80 std::vector<double> &xleg1 = *xlegp1;
81 std::vector<double> &wleg1 = *wlegp1;
82 std::vector<double> &xleg2 = *xlegp2;
83 std::vector<double> &wleg2 = *wlegp2;
93 for (
int j = 0; j < 32; j++) {
94 xleg1[j] = (by - ay) / 2.*xlego[j] + (by + ay) / 2.;
95 wleg1[j] = (by - ay) / 2.*wlego[j];
96 xleg2[j] = (b2y - a2y) / 2.*xlego[j] + (b2y + a2y) / 2.;
97 wleg2[j] = (b2y - a2y) / 2.*wlego[j];
106 std::vector<double> &x = *xp;
107 std::vector<double> &w = *wp;
116 for (
int i = 0; i < 32; i++) {
117 w[i] = (b - a) / 2.*wlego[i];
118 x[i] = (b - a) / 2.*xlego[i] + (b + a) / 2.;
127 std::vector<double> &x = *xp;
128 std::vector<double> &w = *wp;
136 for (
int i = 0; i < 10; i++) {
137 w[i] = (b - a) / 2.*wlego[i];
138 x[i] = (b - a) / 2.*xlego[i] + (b + a) / 2.;
147 std::vector<double> &x = *xp;
148 std::vector<double> &w = *wp;
156 for (
int i = 0; i < 5; i++) {
157 w[i] = (b - a) / 2.*wlego[i];
158 x[i] = (b - a) / 2.*xlego[i] + (b + a) / 2.;
167 std::vector<double> &x = *xp;
168 std::vector<double> &w = *wp;
177 for (
int i = 0; i < 40; i++) {
178 w[i] = (b - a) / 2.*wlego[i];
179 x[i] = (b - a) / 2.*xlego[i] + (b + a) / 2.;
188 std::vector<double> &x = *xp;
189 std::vector<double> &w = *wp;
197 for (
int i = 0; i < 32; i++) {
Contains various Gauss-Legendre and Gauss-Laguerre quadratures used in numerical integrations.
const double coefficients_xleg10[10]
Nodes of the 10-point Gauss-Legendre quadrature.
void GetCoefs2DLaguerre32Legendre32(double ay, double by, std::vector< double > *xlag, std::vector< double > *wlag, std::vector< double > *xleg, std::vector< double > *wleg)
const double coefficients_wleg40[40]
Weights of the 40-point Gauss-Legendre quadrature.
const double coefficients_xleg32[32]
Nodes of the 32-point Gauss-Legendre quadrature.
const double coefficients_wleg32[32]
Weights of the 32-point Gauss-Legendre quadrature.
void GetCoefsIntegrateLegendre10(double a, double b, std::vector< double > *x, std::vector< double > *w)
const double coefficients_xleg40[40]
Nodes of the 40-point Gauss-Legendre quadrature.
const double coefficients_wlag32[32]
Weights of the 32-point Gauss-Laguerre quadrature.
void GetCoefsIntegrateLegendre32(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)
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.
void GetCoefsIntegrateLaguerre32(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 GetCoefsIntegrateLegendre40(double a, double b, std::vector< double > *x, std::vector< double > *w)
double Integrate2DLaguerre32Legendre32(double(*func)(double, double), double ay, double by)
const double coefficients_xlag32[32]
Nodes of the 32-point Gauss-Laguerre quadrature.
The main namespace where all classes and functions of the Thermal-FIST library reside.