MUQ  0.4.3
muq::Approximation::Quadrature Class Referenceabstract

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>

Inheritance diagram for muq::Approximation::Quadrature:

Detailed Description

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
 

Constructor & Destructor Documentation

◆ Quadrature()

muq::Approximation::Quadrature::Quadrature ( unsigned int  dimIn)
inline

Definition at line 127 of file Quadrature.h.

◆ ~Quadrature()

virtual muq::Approximation::Quadrature::~Quadrature ( )
virtualdefault

Member Function Documentation

◆ Compute() [1/2]

virtual void muq::Approximation::Quadrature::Compute ( Eigen::RowVectorXi const &  orders)
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().

◆ Compute() [2/2]

◆ Dim()

virtual unsigned int muq::Approximation::Quadrature::Dim ( ) const
inlinevirtual

Return the dimension of the quadrature rule.

Definition at line 155 of file Quadrature.h.

References dim.

◆ Exactness()

unsigned int Quadrature::Exactness ( unsigned int  quadOrder) const
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.

◆ Points()

virtual Eigen::MatrixXd const& muq::Approximation::Quadrature::Points ( ) const
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().

◆ Weights()

virtual Eigen::VectorXd const& muq::Approximation::Quadrature::Weights ( ) const
inlinevirtual

Member Data Documentation

◆ dim

◆ pts

◆ wts


The documentation for this class was generated from the following files: