Base class for multivariate quadrature rules. @detail An abstract class for computing nodes and weights of general quadrature rules. @seealso GaussQuadrature. More...
#include <Quadrature.h>
Base class for multivariate quadrature rules. @detail An abstract class for computing nodes and weights of general quadrature rules. @seealso GaussQuadrature.
Definition at line 124 of file Quadrature.h.
Public Member Functions | |
Quadrature (unsigned int dimIn) | |
virtual | ~Quadrature ()=default |
virtual void | Compute (unsigned int quadOrder)=0 |
virtual unsigned int | Exactness (unsigned int quadOrder) const |
virtual void | Compute (Eigen::RowVectorXi const &orders) |
virtual unsigned int | Dim () const |
virtual Eigen::MatrixXd const & | Points () const |
virtual Eigen::VectorXd const & | Weights () const |
|
inline |
Definition at line 127 of file Quadrature.h.
|
virtualdefault |
|
inlinevirtual |
Base implementation of Compute. Assumes the quadrature rule is 1d and then calls Compute with the first component of the orders vector.
Multivariate quadrature rules should override this function.
Reimplemented in muq::Approximation::SmolyakQuadrature, and muq::Approximation::FullTensorQuadrature.
Definition at line 152 of file Quadrature.h.
References Compute().
Referenced by Compute().
|
pure virtual |
|
inlinevirtual |
Return the dimension of the quadrature rule.
Definition at line 155 of file Quadrature.h.
References dim.
|
virtual |
Returns the order of the polynomial that can be integrated exactly by this quadrature rule. An \(n\)-point Gauss quadrature rule integrates polynomials of order \(2n-1\) exactly. Thus, since \(n\)= quadOrder+1, for Gauss quadrature rules, this function will return 2*quadOrder+1.
In the multivariate tensor product rule, the maximum exactness across all dimensions is returned.
If not exactness information is known (or implemented) for a particular quadrature rule, an exception will be thrown.
Reimplemented in muq::Approximation::GaussQuadrature, muq::Approximation::GaussPattersonQuadrature, muq::Approximation::FullTensorQuadrature, muq::Approximation::ExponentialGrowthQuadrature, and muq::Approximation::ClenshawCurtisQuadrature.
Definition at line 7 of file Quadrature.cpp.
|
inlinevirtual |
Return the quadrature points. The output is (Dim x NumPts), where dim is the dimension of the integral under consideration and NumPts is the number of quadrature points used in the rule.
Reimplemented in muq::Approximation::ExponentialGrowthQuadrature.
Definition at line 161 of file Quadrature.h.
References pts.
Referenced by ConstructDensity(), muq::Approximation::AdaptiveSmolyakQuadrature::OneTermPoints(), and muq::Approximation::PCEFactory::Setup().
|
inlinevirtual |
Return the quadrature weights.
Reimplemented in muq::Approximation::ExponentialGrowthQuadrature.
Definition at line 165 of file Quadrature.h.
References wts.
Referenced by muq::Approximation::AdaptiveSmolyakQuadrature::ComputeOneTerm(), ConstructDensity(), and muq::Approximation::PCEFactory::Setup().
|
protected |
Definition at line 169 of file Quadrature.h.
Referenced by muq::Approximation::SmolyakQuadrature::BuildMultis(), muq::Approximation::FullTensorQuadrature::Compute(), muq::Approximation::SmolyakQuadrature::Compute(), Dim(), and muq::Approximation::SmolyakQuadrature::UpdateWeights().
|
protected |
Definition at line 170 of file Quadrature.h.
Referenced by muq::Approximation::FullTensorQuadrature::Compute(), muq::Approximation::SmolyakQuadrature::Compute(), muq::Approximation::ClenshawCurtisQuadrature::Compute(), muq::Approximation::GaussPattersonQuadrature::Compute(), muq::Approximation::GaussQuadrature::Compute(), and Points().
|
protected |
Definition at line 171 of file Quadrature.h.
Referenced by muq::Approximation::FullTensorQuadrature::Compute(), muq::Approximation::SmolyakQuadrature::Compute(), muq::Approximation::ClenshawCurtisQuadrature::Compute(), muq::Approximation::GaussPattersonQuadrature::Compute(), muq::Approximation::GaussQuadrature::Compute(), and Weights().