MUQ  0.4.3
muq::Approximation::GaussQuadrature Class Reference

Class for computing Gauss Quadrature rules from an orthogonal polynomial family. More...

#include <GaussQuadrature.h>

Inheritance diagram for muq::Approximation::GaussQuadrature:

Detailed Description

Class for computing Gauss Quadrature rules from an orthogonal polynomial family.

Uses the Golub-Welsch algorithm to construct a Gauss Quadrature rule of a specified order.

Definition at line 20 of file GaussQuadrature.h.

Public Member Functions

 GaussQuadrature ()
 
virtual ~GaussQuadrature ()=default
 
 GaussQuadrature (std::shared_ptr< OrthogonalPolynomial > polyIn)
 
 GaussQuadrature (std::shared_ptr< OrthogonalPolynomial > polyIn, int polyOrderIn)
 
virtual void Compute (unsigned int quadOrder) override
 
virtual unsigned int Exactness (unsigned int quadOrder) const override
 
- Public Member Functions inherited from muq::Approximation::Quadrature
 Quadrature (unsigned int dimIn)
 
virtual ~Quadrature ()=default
 
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

◆ GaussQuadrature() [1/3]

GaussQuadrature::GaussQuadrature ( )

Definition at line 5 of file GaussQuadrature.cpp.

◆ ~GaussQuadrature()

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

◆ GaussQuadrature() [2/3]

GaussQuadrature::GaussQuadrature ( std::shared_ptr< OrthogonalPolynomial polyIn)

Definition at line 7 of file GaussQuadrature.cpp.

◆ GaussQuadrature() [3/3]

GaussQuadrature::GaussQuadrature ( std::shared_ptr< OrthogonalPolynomial polyIn,
int  polyOrderIn 
)

Definition at line 12 of file GaussQuadrature.cpp.

References Compute().

Member Function Documentation

◆ Compute()

void GaussQuadrature::Compute ( unsigned int  quadOrder)
overridevirtual

◆ Exactness()

virtual unsigned int muq::Approximation::GaussQuadrature::Exactness ( unsigned int  quadOrder) const
inlineoverridevirtual

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 from muq::Approximation::Quadrature.

Definition at line 35 of file GaussQuadrature.h.

Member Data Documentation

◆ poly

std::shared_ptr<OrthogonalPolynomial> muq::Approximation::GaussQuadrature::poly
private

Definition at line 39 of file GaussQuadrature.h.

Referenced by Compute().

◆ polyOrder

int muq::Approximation::GaussQuadrature::polyOrder
private

Definition at line 41 of file GaussQuadrature.h.

Referenced by Compute().


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