Stokhos Development
|
Multivariate orthogonal polynomial basis generated from a total-order complete-polynomial tensor product of univariate polynomials. More...
#include <Stokhos_CompletePolynomialBasis.hpp>
Public Member Functions | |
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 | ~CompletePolynomialBasis () |
Destructor. | |
Implementation of Stokhos::OrthogPolyBasis methods | |
ordinal_type | order () const |
Return order of basis. | |
ordinal_type | dimension () const |
Return dimension of basis. | |
virtual ordinal_type | size () const |
Return total size of basis. | |
virtual const Teuchos::Array< value_type > & | norm_squared () const |
Return array storing norm-squared of each basis polynomial. | |
virtual const value_type & | norm_squared (ordinal_type i) const |
Return norm squared of basis polynomial i . | |
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > | computeTripleProductTensor () const |
Compute triple product tensor. | |
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > | computeLinearTripleProductTensor () const |
Compute linear triple product tensor where k = 0,1,..,d. | |
virtual value_type | evaluateZero (ordinal_type i) const |
Evaluate basis polynomial i at zero. | |
virtual void | evaluateBases (const Teuchos::ArrayView< const value_type > &point, Teuchos::Array< value_type > &basis_vals) const |
Evaluate basis polynomials at given point point . | |
virtual void | print (std::ostream &os) const |
Print basis to stream os . | |
virtual const std::string & | getName () const |
Return string name of basis. | |
Implementation of Stokhos::ProductBasis methods | |
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. | |
Teuchos::Array< Teuchos::RCP< const OneDOrthogPolyBasis< ordinal_type, value_type > > > | getCoordinateBases () const |
Return coordinate bases. | |
virtual MultiIndex< ordinal_type > | getMaxOrders () const |
Return maximum order allowable for each coordinate basis. | |
![]() | |
ProductBasis () | |
Constructor. | |
virtual | ~ProductBasis () |
Destructor. | |
![]() | |
OrthogPolyBasis () | |
Constructor. | |
virtual | ~OrthogPolyBasis () |
Destructor. | |
![]() | |
DerivBasis () | |
Constructor. | |
virtual | ~DerivBasis () |
Destructor. | |
Implementation of Stokhos::DerivBasis methods | |
typedef Stokhos::CompletePolynomialBasisUtils< ordinal_type, value_type > | CPBUtils |
typedef Stokhos::Sparse3Tensor< ordinal_type, value_type > | Cijk_type |
Short-hand for Cijk. | |
std::string | name |
Name of basis. | |
ordinal_type | p |
Total order of basis. | |
ordinal_type | d |
Total dimension of basis. | |
ordinal_type | sz |
Total size of basis. | |
Teuchos::Array< Teuchos::RCP< const OneDOrthogPolyBasis< ordinal_type, value_type > > > | bases |
Array of bases. | |
Teuchos::Array< ordinal_type > | basis_orders |
Array storing order of each basis. | |
value_type | sparse_tol |
Tolerance for computing sparse Cijk. | |
bool | use_old_cijk_alg |
Use old algorithm for computing Cijk. | |
Teuchos::RCP< Teuchos::Array< value_type > > | deriv_coeffs |
Coefficients for derivative. | |
Teuchos::Array< value_type > | norms |
Norms. | |
Teuchos::Array< MultiIndex< ordinal_type > > | terms |
2-D array of basis terms | |
Teuchos::Array< ordinal_type > | num_terms |
Number of terms up to each order. | |
Teuchos::Array< Teuchos::Array< value_type > > | basis_eval_tmp |
Temporary array used in basis evaluation. | |
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 ![]() ![]() ![]() ![]() | |
virtual Teuchos::RCP< Teuchos::SerialDenseMatrix< ordinal_type, value_type > > | computeDerivDoubleProductTensor () const |
Compute double product tensor ![]() ![]() ![]() ![]() | |
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > | computeTripleProductTensorOld (ordinal_type order) const |
Compute triple product tensor using old algorithm. | |
virtual Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > | computeTripleProductTensorNew (ordinal_type order) const |
Compute triple product tensor using new algorithm. | |
Multivariate orthogonal polynomial basis generated from a total-order complete-polynomial tensor product of univariate polynomials.
The multivariate polynomials are given by
where
NOTE: Currently all coordinate bases must be of the samer order
Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::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.
bases | array of 1-D coordinate bases |
sparse_tol | tolerance used to drop terms in sparse triple-product tensors |
use_old_cijk_alg | use old algorithm for computing the sparse triple product tensor (significantly slower, but simpler) |
deriv_coeffs | direction used to define derivatives for derivative product tensors. Defaults to all one's if not supplied. |
References Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::bases, Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::basis_eval_tmp, Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::basis_orders, Stokhos::CompletePolynomialBasisUtils< ordinal_type, value_type >::compute_terms(), Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::d, Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::deriv_coeffs, Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::getName(), Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::name, Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::norm_squared(), Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::norms, Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::num_terms, Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::p, Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::sz, and Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::terms.
|
virtual |
Compute double product tensor
The definition of deriv_coeffs
constructor argument.
Implements Stokhos::DerivBasis< ordinal_type, value_type >.
|
virtual |
Compute triple product tensor
The definition of deriv_coeffs
constructor argument.
Implements Stokhos::DerivBasis< ordinal_type, value_type >.
|
virtual |
Compute linear triple product tensor where k = 0,1,..,d.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Compute triple product tensor.
The
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Return dimension of basis.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Evaluate basis polynomials at given point point
.
Size of returned array is given by size(), and coefficients are ordered from order 0 up to size size()-1.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Evaluate basis polynomial i
at zero.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Return coordinate bases.
Array is of size dimension().
Implements Stokhos::ProductBasis< ordinal_type, value_type >.
|
virtual |
Return maximum order allowable for each coordinate basis.
Implements Stokhos::ProductBasis< ordinal_type, value_type >.
|
virtual |
Return string name of basis.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Referenced by Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::CompletePolynomialBasis().
|
virtual |
Get index of the multivariate polynomial given orders of each coordinate.
Given the array term
storing
Implements Stokhos::ProductBasis< ordinal_type, value_type >.
|
virtual |
Return array storing norm-squared of each basis polynomial.
Entry
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Referenced by Stokhos::CompletePolynomialBasis< ordinal_type, value_type >::CompletePolynomialBasis().
|
virtual |
Return norm squared of basis polynomial i
.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Return order of basis.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Print basis to stream os
.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Return total size of basis.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
|
virtual |
Get orders of each coordinate polynomial given an index i
.
The returned array is of size
Implements Stokhos::ProductBasis< ordinal_type, value_type >.