42 #ifndef STOKHOS_ONEDORTHOGPOLYBASIS_HPP
43 #define STOKHOS_ONEDORTHOGPOLYBASIS_HPP
53 #ifdef HAVE_STOKHOS_DAKOTA
54 #include "sandia_rules.hpp"
80 template <
typename ordinal_type,
typename value_type>
157 virtual void print(std::ostream& os)
const {};
160 virtual const std::string&
getName()
const = 0;
233 template <
typename ordinal_type,
typename value_type>
OneDOrthogPolyBasis & operator=(const OneDOrthogPolyBasis &b)
virtual ordinal_type coefficientGrowth(ordinal_type n) const =0
Evaluate coefficient growth rule for Smolyak-type bases.
virtual void evaluateBases(const value_type &point, Teuchos::Array< value_type > &basis_pts) const =0
Evaluate each basis polynomial at given point point.
virtual ordinal_type pointGrowth(ordinal_type n) const =0
Evaluate point growth rule for Smolyak-type bases.
virtual const Teuchos::Array< value_type > & norm_squared() const =0
Return array storing norm-squared of each basis polynomial.
virtual value_type evaluate(const value_type &point, ordinal_type order) const =0
Evaluate basis polynomial given by order order at given point point.
virtual void getQuadPoints(ordinal_type quad_order, Teuchos::Array< value_type > &points, Teuchos::Array< value_type > &weights, Teuchos::Array< Teuchos::Array< value_type > > &values) const =0
Compute quadrature points, weights, and values of basis polynomials at given set of points points...
virtual void print(std::ostream &os) const
Print basis to stream os.
virtual ordinal_type quadDegreeOfExactness(ordinal_type n) const =0
int(* LevelToOrderFnPtr)(int level, int growth)
Function pointer needed for level_to_order mappings.
std::ostream & operator<<(std::ostream &os, const ProductContainer< coeff_type > &vec)
virtual ~OneDOrthogPolyBasis()
Destructor.
virtual ordinal_type size() const =0
Return total size of basis (given by order() + 1).
virtual void setSparseGridGrowthRule(LevelToOrderFnPtr ptr)=0
Set sparse grid rule.
Abstract base class for 1-D orthogonal polynomials.
virtual Teuchos::RCP< Stokhos::Dense3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const =0
Compute triple product tensor.
virtual Teuchos::RCP< Teuchos::SerialDenseMatrix< ordinal_type, value_type > > computeDerivDoubleProductTensor() const =0
Compute derivative double product tensor.
OneDOrthogPolyBasis()
Default constructor.
virtual Teuchos::RCP< OneDOrthogPolyBasis< ordinal_type, value_type > > cloneWithOrder(ordinal_type p) const =0
Clone this object with the option of building a higher order basis.
virtual const std::string & getName() const =0
Return string name of basis.
virtual ordinal_type order() const =0
Return order of basis (largest monomial degree ).
virtual LevelToOrderFnPtr getSparseGridGrowthRule() const =0
Get sparse grid level_to_order mapping function.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeSparseTripleProductTensor(ordinal_type order) const =0
Compute triple product tensor.