MUQ  0.4.3
Quadrature.h
Go to the documentation of this file.
1 #ifndef QUADRATURE_H_
2 #define QUADRATURE_H_
3 
4 #include <memory>
5 
6 #include <Eigen/Core>
7 
8 namespace muq {
9  namespace Approximation {
10 
124  class Quadrature {
125  public:
126 
127  Quadrature(unsigned int dimIn) : dim(dimIn){};
128 
129 
130  virtual ~Quadrature() = default;
131 
132  virtual void Compute(unsigned int quadOrder) = 0;
133 
145  virtual unsigned int Exactness(unsigned int quadOrder) const;
146 
152  virtual void Compute(Eigen::RowVectorXi const& orders) { assert(orders.size()==1); Compute(orders(0));}
153 
155  virtual unsigned int Dim() const{return dim;};
156 
161  virtual Eigen::MatrixXd const& Points() const{return pts;};
162 
165  virtual Eigen::VectorXd const& Weights() const{return wts;};
166 
167 
168  protected:
169  unsigned int dim;
170  Eigen::MatrixXd pts;
171  Eigen::VectorXd wts;
172  };
173  }
174 }
175 
176 #endif /* QUADRATURE_H_ */
Base class for multivariate quadrature rules. @detail An abstract class for computing nodes and weigh...
Definition: Quadrature.h:124
virtual void Compute(unsigned int quadOrder)=0
virtual unsigned int Exactness(unsigned int quadOrder) const
Definition: Quadrature.cpp:7
virtual Eigen::MatrixXd const & Points() const
Definition: Quadrature.h:161
Quadrature(unsigned int dimIn)
Definition: Quadrature.h:127
virtual Eigen::VectorXd const & Weights() const
Definition: Quadrature.h:165
virtual unsigned int Dim() const
Definition: Quadrature.h:155
virtual void Compute(Eigen::RowVectorXi const &orders)
Definition: Quadrature.h:152
virtual ~Quadrature()=default