MUQ  0.4.3
AdaptiveSmolyakQuadrature.h
Go to the documentation of this file.
1 #ifndef ADAPTIVESMOLYAKPCE_H
2 #define ADAPTIVESMOLYAKPCE_H
3 
6 
8 
9 namespace muq {
10 namespace Approximation {
11 
12  class AdaptiveSmolyakQuadrature : public SmolyakEstimator<Eigen::VectorXd> {
13 
14  public:
15  AdaptiveSmolyakQuadrature(std::shared_ptr<muq::Modeling::ModPiece> const& modelIn,
16  std::vector<std::shared_ptr<Quadrature>> const& quad1d);
17 
18 
19  virtual ~AdaptiveSmolyakQuadrature() = default;
20 
21  protected:
22  virtual std::vector<Eigen::VectorXd> OneTermPoints(std::shared_ptr<muq::Utilities::MultiIndex> const& multi) override;
23 
24  virtual Eigen::VectorXd ComputeOneTerm(std::shared_ptr<muq::Utilities::MultiIndex> const& multi,
25  std::vector<std::reference_wrapper<const Eigen::VectorXd>> const& modEvals) override;
26 
27  virtual Eigen::VectorXd AddEstimates(double w1, Eigen::VectorXd const& part1,
28  double w2, Eigen::VectorXd const& part2) const override;
29 
30  virtual double ComputeMagnitude(Eigen::VectorXd const& estimate) const override;
31 
32  std::shared_ptr<muq::Utilities::MultiIndex> cachedMulti;
34 
35 
36  }; // class AdaptiveSmolyakQuadrature
37 
38 } // namespace Approximation
39 } // namespace muq
40 
41 
42 #endif
std::shared_ptr< muq::Utilities::MultiIndex > cachedMulti
virtual Eigen::VectorXd ComputeOneTerm(std::shared_ptr< muq::Utilities::MultiIndex > const &multi, std::vector< std::reference_wrapper< const Eigen::VectorXd >> const &modEvals) override
AdaptiveSmolyakQuadrature(std::shared_ptr< muq::Modeling::ModPiece > const &modelIn, std::vector< std::shared_ptr< Quadrature >> const &quad1d)
virtual double ComputeMagnitude(Eigen::VectorXd const &estimate) const override
virtual Eigen::VectorXd AddEstimates(double w1, Eigen::VectorXd const &part1, double w2, Eigen::VectorXd const &part2) const override
virtual std::vector< Eigen::VectorXd > OneTermPoints(std::shared_ptr< muq::Utilities::MultiIndex > const &multi) override
Multivariate quadrature rule defined by the tensor product of 1d rules.