42#ifndef STOKHOS_COMPLETEPOLYNOMIALBASIS_HPP
43#define STOKHOS_COMPLETEPOLYNOMIALBASIS_HPP
45#include "Teuchos_RCP.hpp"
46#include "Teuchos_SerialDenseMatrix.hpp"
71 template <
typename ordinal_type,
typename value_type>
91 value_type> > >&
bases,
94 const Teuchos::RCP< Teuchos::Array<value_type> >&
deriv_coeffs = Teuchos::null);
103 ordinal_type
order()
const;
109 virtual ordinal_type
size()
const;
116 virtual const Teuchos::Array<value_type>&
norm_squared()
const;
119 virtual const value_type&
norm_squared(ordinal_type i)
const;
129 Teuchos::RCP< Stokhos::Sparse3Tensor<ordinal_type, value_type> >
134 Teuchos::RCP< Stokhos::Sparse3Tensor<ordinal_type, value_type> >
146 const Teuchos::ArrayView<const value_type>& point,
147 Teuchos::Array<value_type>& basis_vals)
const;
150 virtual void print(std::ostream& os)
const;
153 virtual const std::string&
getName()
const;
166 virtual const MultiIndex<ordinal_type>&
term(ordinal_type i)
const;
173 virtual ordinal_type
index(
const MultiIndex<ordinal_type>&
term)
const;
202 Teuchos::RCP< Stokhos::Dense3Tensor<ordinal_type, value_type> >
204 const Teuchos::RCP<
const Teuchos::SerialDenseMatrix<ordinal_type, value_type> >& Bij,
218 Teuchos::RCP< Teuchos::SerialDenseMatrix<ordinal_type, value_type> >
227 Teuchos::RCP< Stokhos::Sparse3Tensor<ordinal_type, value_type> >
232 Teuchos::RCP< Stokhos::Sparse3Tensor<ordinal_type, value_type> >
260 Teuchos::Array< Teuchos::RCP<const OneDOrthogPolyBasis<ordinal_type, value_type> > >
bases;
278 Teuchos::Array< MultiIndex<ordinal_type> >
terms;
Utilities for indexing a multi-variate complete polynomial basis.
Multivariate orthogonal polynomial basis generated from a total-order complete-polynomial tensor prod...
virtual value_type evaluateZero(ordinal_type i) const
Evaluate basis polynomial i at zero.
virtual ~CompletePolynomialBasis()
Destructor.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensor() const
Compute triple product tensor.
value_type sparse_tol
Tolerance for computing sparse Cijk.
virtual const MultiIndex< ordinal_type > & term(ordinal_type i) const
Get orders of each coordinate polynomial given an index i.
virtual ordinal_type index(const MultiIndex< ordinal_type > &term) const
Get index of the multivariate polynomial given orders of each coordinate.
std::string name
Name of basis.
ordinal_type sz
Total size of basis.
virtual void print(std::ostream &os) const
Print basis to stream os.
CompletePolynomialBasis(const CompletePolynomialBasis &)
Teuchos::Array< Teuchos::RCP< const OneDOrthogPolyBasis< ordinal_type, value_type > > > getCoordinateBases() const
Return coordinate bases.
Teuchos::Array< ordinal_type > num_terms
Number of terms up to each order.
virtual MultiIndex< ordinal_type > getMaxOrders() const
Return maximum order allowable for each coordinate basis.
virtual void evaluateBases(const Teuchos::ArrayView< const value_type > &point, Teuchos::Array< value_type > &basis_vals) const
Evaluate basis polynomials at given point point.
Stokhos::CompletePolynomialBasisUtils< ordinal_type, value_type > CPBUtils
Teuchos::Array< Teuchos::RCP< const OneDOrthogPolyBasis< ordinal_type, value_type > > > bases
Array of bases.
CompletePolynomialBasis & operator=(const CompletePolynomialBasis &b)
Teuchos::Array< MultiIndex< ordinal_type > > terms
2-D array of basis terms
CompletePolynomialBasis(const Teuchos::Array< Teuchos::RCP< const OneDOrthogPolyBasis< ordinal_type, value_type > > > &bases, const value_type &sparse_tol=1.0e-12, bool use_old_cijk_alg=false, const Teuchos::RCP< Teuchos::Array< value_type > > &deriv_coeffs=Teuchos::null)
Constructor.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeLinearTripleProductTensor() const
Compute linear triple product tensor where k = 0,1,..,d.
bool use_old_cijk_alg
Use old algorithm for computing Cijk.
virtual ordinal_type size() const
Return total size of basis.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensorNew(ordinal_type order) const
Compute triple product tensor using new algorithm.
virtual Teuchos::RCP< Teuchos::SerialDenseMatrix< ordinal_type, value_type > > computeDerivDoubleProductTensor() const
Compute double product tensor where represents the derivative of in the direction .
ordinal_type order() const
Return order of basis.
Stokhos::Sparse3Tensor< ordinal_type, value_type > Cijk_type
Short-hand for Cijk.
Teuchos::RCP< Teuchos::Array< value_type > > deriv_coeffs
Coefficients for derivative.
virtual const std::string & getName() const
Return string name of basis.
Teuchos::Array< value_type > norms
Norms.
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > computeTripleProductTensorOld(ordinal_type order) const
Compute triple product tensor using old algorithm.
virtual const Teuchos::Array< value_type > & norm_squared() const
Return array storing norm-squared of each basis polynomial.
virtual Teuchos::RCP< Stokhos::Dense3Tensor< ordinal_type, value_type > > computeDerivTripleProductTensor(const Teuchos::RCP< const Teuchos::SerialDenseMatrix< ordinal_type, value_type > > &Bij, const Teuchos::RCP< const Stokhos::Sparse3Tensor< ordinal_type, value_type > > &Cijk) const
Compute triple product tensor where represents the derivative of in the direction .
ordinal_type dimension() const
Return dimension of basis.
Teuchos::Array< Teuchos::Array< value_type > > basis_eval_tmp
Temporary array used in basis evaluation.
Teuchos::Array< ordinal_type > basis_orders
Array storing order of each basis.
ordinal_type p
Total order of basis.
ordinal_type d
Total dimension of basis.
Abstract base class for multivariate orthogonal polynomials that support computing double and triple ...
Abstract base class for 1-D orthogonal polynomials.
Abstract base class for multivariate orthogonal polynomials generated from tensor products of univari...
Data structure storing a sparse 3-tensor C(i,j,k) in a a compressed format.
Top-level namespace for Stokhos classes and functions.