MUQ  0.4.3
SmolyakQuadrature.h
Go to the documentation of this file.
1 #ifndef SMOLYAKQUADRATURE_H
2 #define SMOLYAKQUADRATURE_H
3 
6 
8 
9 namespace muq {
10 namespace Approximation {
11 
17  {
18  public:
19 
20  SmolyakQuadrature(unsigned int dim, std::shared_ptr<Quadrature> const& scalarRule);
21 
22  SmolyakQuadrature(std::vector<std::shared_ptr<Quadrature>> const& scalarRulesIn);
23 
24  virtual ~SmolyakQuadrature() = default;
25 
26  virtual void Compute(unsigned int order) override;
27 
28  virtual void Compute(Eigen::RowVectorXi const& orders) override;
29 
30  virtual void Compute(std::shared_ptr<muq::Utilities::MultiIndexSet> const& multis);
31 
47  static Eigen::VectorXd ComputeWeights(std::shared_ptr<muq::Utilities::MultiIndexSet> const& multis);
48 
49  static void UpdateWeights(unsigned int activeInd,
50  std::shared_ptr<muq::Utilities::MultiIndexSet> const& multis,
51  Eigen::VectorXd & multiWeights);
52 
53  std::shared_ptr<muq::Utilities::MultiIndexSet> BuildMultis(Eigen::RowVectorXi const& orders) const;
54 
55  private:
56 
57  std::vector<std::shared_ptr<Quadrature>> scalarRules;
58 
59  }; // class SmolyakQuadrature
60 }
61 }
62 
63 
64 #endif // #ifndef SMOLYAKQUADRATURE_H
Base class for multivariate quadrature rules. @detail An abstract class for computing nodes and weigh...
Definition: Quadrature.h:124
Computes static Smolyak quadrature rules for multivariate integration.
std::vector< std::shared_ptr< Quadrature > > scalarRules
SmolyakQuadrature(unsigned int dim, std::shared_ptr< Quadrature > const &scalarRule)
static void UpdateWeights(unsigned int activeInd, std::shared_ptr< muq::Utilities::MultiIndexSet > const &multis, Eigen::VectorXd &multiWeights)
virtual void Compute(unsigned int order) override
static Eigen::VectorXd ComputeWeights(std::shared_ptr< muq::Utilities::MultiIndexSet > const &multis)
std::shared_ptr< muq::Utilities::MultiIndexSet > BuildMultis(Eigen::RowVectorXi const &orders) const