1 #include "AllClassWrappers.h"
15 #include <pybind11/pybind11.h>
16 #include <pybind11/stl.h>
17 #include <pybind11/eigen.h>
34 py::class_<Quadrature, std::shared_ptr<Quadrature>> quadBase(m,
"Quadrature");
42 py::class_<GaussQuadrature, Quadrature, std::shared_ptr<GaussQuadrature>> quadFunc(m,
"GaussQuadrature");
44 .def(py::init<std::shared_ptr<OrthogonalPolynomial>>())
45 .def(py::init<std::shared_ptr<OrthogonalPolynomial>,
int>())
48 py::class_<ClenshawCurtisQuadrature, Quadrature, std::shared_ptr<ClenshawCurtisQuadrature>> ccQuad(m,
"ClenshawCurtisQuadrature");
51 .def(py::init<bool>())
54 py::class_<GaussPattersonQuadrature, Quadrature, std::shared_ptr<GaussPattersonQuadrature>> gpQuad(m,
"GaussPattersonQuadrature");
59 py::class_<ExponentialGrowthQuadrature, Quadrature, std::shared_ptr<ExponentialGrowthQuadrature>> egQuad(m,
"ExponentialGrowthQuadrature");
61 .def(py::init<std::shared_ptr<Quadrature>>())
64 py::class_<FullTensorQuadrature, Quadrature, std::shared_ptr<FullTensorQuadrature>> tensQuad(m,
"FullTensorQuadrature");
66 .def(py::init<
unsigned int, std::shared_ptr<Quadrature>>())
67 .def(py::init<
unsigned int, std::shared_ptr<Quadrature>,
unsigned int>())
68 .def(py::init<std::vector<std::shared_ptr<Quadrature>>, Eigen::RowVectorXi>());
70 py::class_<SmolyakQuadrature, Quadrature, std::shared_ptr<SmolyakQuadrature>> smolyQuad(m,
"SmolyakQuadrature");
72 .def(py::init<
unsigned int, std::shared_ptr<Quadrature>
const&>())
73 .def(py::init<std::vector<std::shared_ptr<Quadrature>>
const&>())
92 py::class_<AdaptiveSmolyakQuadrature, std::shared_ptr<AdaptiveSmolyakQuadrature>> adaptSmoly(m,
"AdaptiveSmolyakQuadrature");
94 .def(py::init<std::shared_ptr<muq::Modeling::ModPiece>, std::vector<std::shared_ptr<Quadrature>>>())
96 std::shared_ptr<MultiIndexSet>
const& fixedSet,
virtual void Compute(unsigned int index) override
virtual void Compute(unsigned int index) override
virtual void Compute(unsigned int index) override
virtual void Compute(unsigned int quadOrder) override
Base class for multivariate quadrature rules. @detail An abstract class for computing nodes and weigh...
virtual void Compute(unsigned int quadOrder)=0
virtual Eigen::MatrixXd const & Points() const
virtual Eigen::VectorXd const & Weights() const
virtual unsigned int Dim() const
Computes static Smolyak quadrature rules for multivariate integration.
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
void QuadratureWrapper(pybind11::module &m)
boost::property_tree::ptree ConvertDictToPtree(pybind11::dict dict)