25 #include <queso/1DQuadrature.h>
33 double minDomainValue,
34 double maxDomainValue,
37 m_minDomainValue(minDomainValue),
38 m_maxDomainValue(maxDomainValue),
45 "Base1DQuadrature::constructor()",
75 const std::vector<double>&
80 "Base1DQuadrature::positions()",
85 const std::vector<double>&
90 "Base1DQuadrature::weights()",
99 double minDomainValue,
100 double maxDomainValue,
101 const std::vector<double>& positions,
102 const std::vector<double>& weights)
111 "Generic1DQuadrature::constructor()",
112 "invalid positions");
116 "Generic1DQuadrature::constructor()",
117 "inconsistent positions and weight");
134 double minDomainValue,
135 double maxDomainValue,
137 bool densityIsNormalized)
177 m_weights [0] = (322.-13.*sqrt(70.))/900.;
178 m_weights [1] = (322.+13.*sqrt(70.))/900.;
180 m_weights [3] = (322.+13.*sqrt(70.))/900.;
181 m_weights [4] = (322.-13.*sqrt(70.))/900.;
191 m_weights [0] = 0.1713244923791703450402961;
192 m_weights [1] = 0.3607615730481386075698335;
193 m_weights [2] = 0.4679139345726910473898703;
194 m_weights [3] = 0.4679139345726910473898703;
195 m_weights [4] = 0.3607615730481386075698335;
196 m_weights [5] = 0.1713244923791703450402961;
207 m_weights [0] = 0.1294849661688696932706114;
208 m_weights [1] = 0.2797053914892766679014678;
209 m_weights [2] = 0.3818300505051189449503698;
210 m_weights [3] = 0.4179591836734693877551020;
211 m_weights [4] = 0.3818300505051189449503698;
212 m_weights [5] = 0.2797053914892766679014678;
213 m_weights [6] = 0.1294849661688696932706114;
245 m_weights [ 0] = 0.0556685671161736664827537;
246 m_weights [ 1] = 0.1255803694649046246346943;
247 m_weights [ 2] = 0.1862902109277342514260976;
248 m_weights [ 3] = 0.2331937645919904799185237;
249 m_weights [ 4] = 0.2628045445102466621806889;
250 m_weights [ 5] = 0.2729250867779006307144835;
251 m_weights [ 6] = 0.2628045445102466621806889;
252 m_weights [ 7] = 0.2331937645919904799185237;
253 m_weights [ 8] = 0.1862902109277342514260976;
254 m_weights [ 9] = 0.1255803694649046246346943;
255 m_weights [10] = 0.0556685671161736664827537;
271 m_weights [ 0] = 0.0471753363865118271946160;
272 m_weights [ 1] = 0.1069393259953184309602547;
273 m_weights [ 2] = 0.1600783285433462263346525;
274 m_weights [ 3] = 0.2031674267230659217490645;
275 m_weights [ 4] = 0.2334925365383548087608499;
276 m_weights [ 5] = 0.2491470458134027850005624;
277 m_weights [ 6] = 0.2491470458134027850005624;
278 m_weights [ 7] = 0.2334925365383548087608499;
279 m_weights [ 8] = 0.2031674267230659217490645;
280 m_weights [ 9] = 0.1600783285433462263346525;
281 m_weights [10] = 0.1069393259953184309602547;
282 m_weights [11] = 0.0471753363865118271946160;
299 m_weights [ 0] = 0.0404840047653158795200216;
300 m_weights [ 1] = 0.0921214998377284479144218;
301 m_weights [ 2] = 0.1388735102197872384636018;
302 m_weights [ 3] = 0.1781459807619457382800467;
303 m_weights [ 4] = 0.2078160475368885023125232;
304 m_weights [ 5] = 0.2262831802628972384120902;
305 m_weights [ 6] = 0.2325515532308739101945895;
306 m_weights [ 7] = 0.2262831802628972384120902;
307 m_weights [ 8] = 0.2078160475368885023125232;
308 m_weights [ 9] = 0.1781459807619457382800467;
309 m_weights [10] = 0.1388735102197872384636018;
310 m_weights [11] = 0.0921214998377284479144218;
311 m_weights [12] = 0.0404840047653158795200216;
361 14 ±0.1080549487073436620662447 0.2152638534631577901958764
362 ±0.3191123689278897604356718 0.2051984637212956039659241
363 ±0.5152486363581540919652907 0.1855383974779378137417166
364 ±0.6872929048116854701480198 0.1572031671581935345696019
365 ±0.8272013150697649931897947 0.1215185706879031846894148
366 ±0.9284348836635735173363911 0.0801580871597602098056333
367 ±0.9862838086968123388415973 0.0351194603317518630318329
371 m_weights [ 0] = 0.0241483028685479319601100;
372 m_weights [ 1] = 0.0554595293739872011294402;
373 m_weights [ 2] = 0.0850361483171791808835354;
374 m_weights [ 3] = 0.1118838471934039710947884;
375 m_weights [ 4] = 0.1351363684685254732863200;
376 m_weights [ 5] = 0.1540457610768102880814316;
377 m_weights [ 6] = 0.1680041021564500445099707;
378 m_weights [ 7] = 0.1765627053669926463252710;
379 m_weights [ 8] = 0.1794464703562065254582656;
380 m_weights [ 9] = 0.1765627053669926463252710;
381 m_weights [10] = 0.1680041021564500445099707;
382 m_weights [11] = 0.1540457610768102880814316;
383 m_weights [12] = 0.1351363684685254732863200;
384 m_weights [13] = 0.1118838471934039710947884;
385 m_weights [14] = 0.0850361483171791808835354;
386 m_weights [15] = 0.0554595293739872011294402;
387 m_weights [16] = 0.0241483028685479319601100;
409 std::cerr <<
"In UniformLegendre1DQuadrature::constructor()"
414 "UniformLegendre1DQuadrature::constructor()",
415 "order not supported");
420 for (
unsigned int j = 0; j <
m_positions.size(); ++j) {
422 if (densityIsNormalized) {
480 m_weights [0] = sqrt(M_PI)/4./(3.-sqrt(6.));
481 m_weights [1] = sqrt(M_PI)/4./(3.+sqrt(6.));
482 m_weights [2] = sqrt(M_PI)/4./(3.+sqrt(6.));
483 m_weights [3] = sqrt(M_PI)/4./(3.-sqrt(6.));
650 std::cerr <<
"In GaussianHermite1DQuadrature::constructor()"
655 "GaussianHermite1DQuadrature::constructor()",
656 "order not supported");
659 for (
unsigned int j = 0; j < (
m_order+1); ++j) {
679 double minDomainValue,
680 double maxDomainValue,
693 "WignerInverseChebyshev1st1DQuadrature::constructor()",
694 "order not supported");
699 for (
unsigned int j = 0; j <
m_positions.size(); ++j) {
719 double minDomainValue,
720 double maxDomainValue,
730 for (
unsigned int i = 0; i < n; ++i) {
731 double angle = M_PI*((double)(i+1))/((
double)(n+1));
732 double cosValue = cos(angle);
733 double sinValue = sin(angle);
735 m_weights[i] = ( M_PI/((double)(n+1)) )*sinValue*sinValue;
739 for (
unsigned int j = 0; j <
m_positions.size(); ++j) {
UniformLegendre1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order, bool densityIsNormalized)
Default constructor.
Generic1DQuadrature(double minDomainValue, double maxDomainValue, const std::vector< double > &positions, const std::vector< double > &weights)
Default constructor.
Base1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
Default constructor.
std::vector< double > m_weights
~UniformLegendre1DQuadrature()
Destructor.
GaussianHermite1DQuadrature(double mean, double stddev, unsigned int order)
Default constructor.
virtual ~Base1DQuadrature()
Virtual destructor.
void dumbRoutine() const
A bogus method.
const int UQ_UNAVAILABLE_RANK
double maxDomainValue() const
Returns the maximum value of the domain of the (one-dimensional) function.
std::vector< double > m_positions
unsigned int order() const
Returns the order of the quadrature rule.
void dumbRoutine() const
A bogus method.
double minDomainValue() const
Returns the minimum value of the domain of the (one-dimensional) function.
Base class for one-dimensional quadrature rules (numerical integration of functions).
WignerChebyshev2nd1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
Default constructor.
WignerInverseChebyshev1st1DQuadrature(double minDomainValue, double maxDomainValue, unsigned int order)
TODO: Default constructor.
~GaussianHermite1DQuadrature()
Destructor.
~Generic1DQuadrature()
Destructor.
~WignerInverseChebyshev1st1DQuadrature()
Destructor.
~WignerChebyshev2nd1DQuadrature()
Destructor.
void dumbRoutine() const
A bogus method.
const std::vector< double > & positions() const
Array of the positions for the numerical integration.
const std::vector< double > & weights() const
Array of the weights used in the numerical integration.
#define UQ_FATAL_TEST_MACRO(test, givenRank, where, what)
void dumbRoutine() const
Bogus routine.
void dumbRoutine() const
Bogus routine.