42 #ifndef STOKHOS_RECURRENCEBASIS_HPP
43 #define STOKHOS_RECURRENCEBASIS_HPP
84 template <
typename ordinal_type,
typename value_type>
168 virtual void print(std::ostream& os)
const;
171 virtual const std::string&
getName()
const;
284 virtual void setup();
Teuchos::Array< value_type > delta
Recurrence coefficients.
virtual void evaluateBases(const value_type &point, Teuchos::Array< value_type > &basis_pts) const
Evaluate each basis polynomial at given point point.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeSparseTripleProductTensor(ordinal_type order) const
Compute triple product tensor.
value_type quad_zero_tol
Tolerance for quadrature points near zero.
virtual void getRecurrenceCoefficients(Teuchos::Array< value_type > &alpha, Teuchos::Array< value_type > &beta, Teuchos::Array< value_type > &delta, Teuchos::Array< value_type > &gamma) const
Return recurrence coefficients defined by above formula.
virtual const std::string & getName() const
Return string name of basis.
Teuchos::Array< value_type > norms
Norms.
Implementation of OneDOrthogPolyBasis based on the general three-term recurrence relationship: for ...
std::string name
Name of basis.
virtual value_type evaluate(const value_type &point, ordinal_type order) const
Evaluate basis polynomial given by order order at given point point.
virtual ~RecurrenceBasis()
Destructor.
virtual ordinal_type pointGrowth(ordinal_type n) const
Evaluate point growth rule for Smolyak-type bases.
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
Compute quadrature points, weights, and values of basis polynomials at given set of points points...
Teuchos::Array< value_type > beta
Recurrence coefficients.
GrowthPolicy
Enumerated type for determining Smolyak growth policies.
virtual void setQuadZeroTol(value_type tol)
Set tolerance for zero in quad point generation.
virtual Teuchos::RCP< Stokhos::Dense3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const
Compute triple product tensor.
Teuchos::Array< value_type > alpha
Recurrence coefficients.
void normalizeRecurrenceCoefficients(Teuchos::Array< value_type > &alpha, Teuchos::Array< value_type > &beta, Teuchos::Array< value_type > &delta, Teuchos::Array< value_type > &gamma) const
Normalize coefficients.
virtual void evaluateBasesAndDerivatives(const value_type &point, Teuchos::Array< value_type > &vals, Teuchos::Array< value_type > &derivs) const
Evaluate basis polynomials and their derivatives at given point point.
OneDOrthogPolyBasis< ordinal_type, value_type >::LevelToOrderFnPtr LevelToOrderFnPtr
Function pointer needed for level_to_order mappings.
virtual ordinal_type quadDegreeOfExactness(ordinal_type n) const
virtual Teuchos::RCP< Teuchos::SerialDenseMatrix< ordinal_type, value_type > > computeDerivDoubleProductTensor() const
Compute derivative double product tensor.
virtual ordinal_type order() const
Return order of basis (largest monomial degree ).
virtual void print(std::ostream &os) const
Print basis to stream os.
LevelToOrderFnPtr sparse_grid_growth_rule
Sparse grid growth rule (as determined by Pecos)
virtual ordinal_type coefficientGrowth(ordinal_type n) const
Evaluate coefficient growth rule for Smolyak-type bases.
virtual void setup()
Setup basis after computing recurrence coefficients.
virtual bool computeRecurrenceCoefficients(ordinal_type n, Teuchos::Array< value_type > &alpha, Teuchos::Array< value_type > &beta, Teuchos::Array< value_type > &delta, Teuchos::Array< value_type > &gamma) const =0
Compute recurrence coefficients.
Abstract base class for 1-D orthogonal polynomials.
RecurrenceBasis & operator=(const RecurrenceBasis &b)
virtual ordinal_type size() const
Return total size of basis (given by order() + 1).
ordinal_type p
Order of basis.
Teuchos::Array< value_type > gamma
Recurrence coefficients.
virtual void setSparseGridGrowthRule(LevelToOrderFnPtr ptr)
Set sparse grid rule.
bool normalize
Normalize basis.
virtual LevelToOrderFnPtr getSparseGridGrowthRule() const
Get sparse grid level_to_order mapping function.
virtual const Teuchos::Array< value_type > & norm_squared() const
Return array storing norm-squared of each basis polynomial.
RecurrenceBasis(const std::string &name, ordinal_type p, bool normalize, GrowthPolicy growth=SLOW_GROWTH)
Constructor to be called by derived classes.
GrowthPolicy growth
Smolyak growth policy.