25 #include <queso/1DQuadrature.h>
33 double minDomainValue,
34 double maxDomainValue,
37 m_minDomainValue(minDomainValue),
38 m_maxDomainValue(maxDomainValue),
72 const std::vector<double>&
79 const std::vector<double>&
90 double minDomainValue,
91 double maxDomainValue,
92 const std::vector<double>& positions,
93 const std::vector<double>& weights)
119 double minDomainValue,
120 double maxDomainValue,
122 bool densityIsNormalized)
162 m_weights [0] = (322.-13.*sqrt(70.))/900.;
163 m_weights [1] = (322.+13.*sqrt(70.))/900.;
165 m_weights [3] = (322.+13.*sqrt(70.))/900.;
166 m_weights [4] = (322.-13.*sqrt(70.))/900.;
176 m_weights [0] = 0.1713244923791703450402961;
177 m_weights [1] = 0.3607615730481386075698335;
178 m_weights [2] = 0.4679139345726910473898703;
179 m_weights [3] = 0.4679139345726910473898703;
180 m_weights [4] = 0.3607615730481386075698335;
181 m_weights [5] = 0.1713244923791703450402961;
192 m_weights [0] = 0.1294849661688696932706114;
193 m_weights [1] = 0.2797053914892766679014678;
194 m_weights [2] = 0.3818300505051189449503698;
195 m_weights [3] = 0.4179591836734693877551020;
196 m_weights [4] = 0.3818300505051189449503698;
197 m_weights [5] = 0.2797053914892766679014678;
198 m_weights [6] = 0.1294849661688696932706114;
230 m_weights [ 0] = 0.0556685671161736664827537;
231 m_weights [ 1] = 0.1255803694649046246346943;
232 m_weights [ 2] = 0.1862902109277342514260976;
233 m_weights [ 3] = 0.2331937645919904799185237;
234 m_weights [ 4] = 0.2628045445102466621806889;
235 m_weights [ 5] = 0.2729250867779006307144835;
236 m_weights [ 6] = 0.2628045445102466621806889;
237 m_weights [ 7] = 0.2331937645919904799185237;
238 m_weights [ 8] = 0.1862902109277342514260976;
239 m_weights [ 9] = 0.1255803694649046246346943;
240 m_weights [10] = 0.0556685671161736664827537;
256 m_weights [ 0] = 0.0471753363865118271946160;
257 m_weights [ 1] = 0.1069393259953184309602547;
258 m_weights [ 2] = 0.1600783285433462263346525;
259 m_weights [ 3] = 0.2031674267230659217490645;
260 m_weights [ 4] = 0.2334925365383548087608499;
261 m_weights [ 5] = 0.2491470458134027850005624;
262 m_weights [ 6] = 0.2491470458134027850005624;
263 m_weights [ 7] = 0.2334925365383548087608499;
264 m_weights [ 8] = 0.2031674267230659217490645;
265 m_weights [ 9] = 0.1600783285433462263346525;
266 m_weights [10] = 0.1069393259953184309602547;
267 m_weights [11] = 0.0471753363865118271946160;
284 m_weights [ 0] = 0.0404840047653158795200216;
285 m_weights [ 1] = 0.0921214998377284479144218;
286 m_weights [ 2] = 0.1388735102197872384636018;
287 m_weights [ 3] = 0.1781459807619457382800467;
288 m_weights [ 4] = 0.2078160475368885023125232;
289 m_weights [ 5] = 0.2262831802628972384120902;
290 m_weights [ 6] = 0.2325515532308739101945895;
291 m_weights [ 7] = 0.2262831802628972384120902;
292 m_weights [ 8] = 0.2078160475368885023125232;
293 m_weights [ 9] = 0.1781459807619457382800467;
294 m_weights [10] = 0.1388735102197872384636018;
295 m_weights [11] = 0.0921214998377284479144218;
296 m_weights [12] = 0.0404840047653158795200216;
346 14 ±0.1080549487073436620662447 0.2152638534631577901958764
347 ±0.3191123689278897604356718 0.2051984637212956039659241
348 ±0.5152486363581540919652907 0.1855383974779378137417166
349 ±0.6872929048116854701480198 0.1572031671581935345696019
350 ±0.8272013150697649931897947 0.1215185706879031846894148
351 ±0.9284348836635735173363911 0.0801580871597602098056333
352 ±0.9862838086968123388415973 0.0351194603317518630318329
356 m_weights [ 0] = 0.0241483028685479319601100;
357 m_weights [ 1] = 0.0554595293739872011294402;
358 m_weights [ 2] = 0.0850361483171791808835354;
359 m_weights [ 3] = 0.1118838471934039710947884;
360 m_weights [ 4] = 0.1351363684685254732863200;
361 m_weights [ 5] = 0.1540457610768102880814316;
362 m_weights [ 6] = 0.1680041021564500445099707;
363 m_weights [ 7] = 0.1765627053669926463252710;
364 m_weights [ 8] = 0.1794464703562065254582656;
365 m_weights [ 9] = 0.1765627053669926463252710;
366 m_weights [10] = 0.1680041021564500445099707;
367 m_weights [11] = 0.1540457610768102880814316;
368 m_weights [12] = 0.1351363684685254732863200;
369 m_weights [13] = 0.1118838471934039710947884;
370 m_weights [14] = 0.0850361483171791808835354;
371 m_weights [15] = 0.0554595293739872011294402;
372 m_weights [16] = 0.0241483028685479319601100;
394 std::cerr <<
"In UniformLegendre1DQuadrature::constructor()"
402 for (
unsigned int j = 0; j <
m_positions.size(); ++j) {
404 if (densityIsNormalized) {
462 m_weights [0] = sqrt(M_PI)/4./(3.-sqrt(6.));
463 m_weights [1] = sqrt(M_PI)/4./(3.+sqrt(6.));
464 m_weights [2] = sqrt(M_PI)/4./(3.+sqrt(6.));
465 m_weights [3] = sqrt(M_PI)/4./(3.-sqrt(6.));
632 std::cerr <<
"In GaussianHermite1DQuadrature::constructor()"
638 for (
unsigned int j = 0; j < (
m_order+1); ++j) {
658 double minDomainValue,
659 double maxDomainValue,
675 for (
unsigned int j = 0; j <
m_positions.size(); ++j) {
695 double minDomainValue,
696 double maxDomainValue,
706 for (
unsigned int i = 0; i < n; ++i) {
707 double angle = M_PI*((double)(i+1))/((
double)(n+1));
708 double cosValue = cos(angle);
709 double sinValue = sin(angle);
711 m_weights[i] = ( M_PI/((double)(n+1)) )*sinValue*sinValue;
715 for (
unsigned int j = 0; j <
m_positions.size(); ++j) {
double minDomainValue() const
Returns the minimum value of the domain of the (one-dimensional) function.
~WignerInverseChebyshev1st1DQuadrature()
Destructor.
void dumbRoutine() const
Bogus routine.
const std::vector< double > & positions() const
Array of the positions for the numerical integration.
virtual ~Base1DQuadrature()
Virtual destructor.
std::vector< double > m_positions
unsigned int order() const
Returns the order of the quadrature rule.
#define queso_require_not_equal_to_msg(expr1, expr2, msg)
void dumbRoutine() const
A bogus method.
#define queso_error_msg(msg)
#define queso_require_equal_to_msg(expr1, expr2, msg)
void dumbRoutine() const
A bogus method.
WignerChebyshev2nd1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
Default constructor.
GaussianHermite1DQuadrature(double mean, double stddev, unsigned int order)
Default constructor.
#define queso_require_less_msg(expr1, expr2, msg)
~GaussianHermite1DQuadrature()
Destructor.
~UniformLegendre1DQuadrature()
Destructor.
WignerInverseChebyshev1st1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
TODO: Default constructor.
void dumbRoutine() const
Bogus routine.
~Generic1DQuadrature()
Destructor.
Base1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
Default constructor.
UniformLegendre1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order, bool densityIsNormalized)
Default constructor.
double maxDomainValue() const
Returns the maximum value of the domain of the (one-dimensional) function.
Base class for one-dimensional quadrature rules (numerical integration of functions).
const std::vector< double > & weights() const
Array of the weights used in the numerical integration.
void dumbRoutine() const
A bogus method.
Generic1DQuadrature(double minDomainValue, double maxDomainValue, const std::vector< double > &positions, const std::vector< double > &weights)
Default constructor.
std::vector< double > m_weights
~WignerChebyshev2nd1DQuadrature()
Destructor.