|
Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
|
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. More... | |
| virtual | ~CompletePolynomialBasis () |
| Destructor. More... | |
Public Member Functions inherited from Stokhos::ProductBasis< ordinal_type, value_type > | |
| ProductBasis () | |
| Constructor. More... | |
| virtual | ~ProductBasis () |
| Destructor. More... | |
Public Member Functions inherited from Stokhos::OrthogPolyBasis< ordinal_type, value_type > | |
| OrthogPolyBasis () | |
| Constructor. More... | |
| virtual | ~OrthogPolyBasis () |
| Destructor. More... | |
Public Member Functions inherited from Stokhos::DerivBasis< ordinal_type, value_type > | |
| DerivBasis () | |
| Constructor. More... | |
| virtual | ~DerivBasis () |
| Destructor. More... | |
Protected Types | |
| typedef Stokhos::CompletePolynomialBasisUtils < ordinal_type, value_type > | CPBUtils |
| typedef Stokhos::Sparse3Tensor < ordinal_type, value_type > | Cijk_type |
| Short-hand for Cijk. More... | |
Protected Member Functions | |
| virtual Teuchos::RCP < Stokhos::Sparse3Tensor < ordinal_type, value_type > > | computeTripleProductTensorOld (ordinal_type order) const |
| Compute triple product tensor using old algorithm. More... | |
| virtual Teuchos::RCP < Stokhos::Sparse3Tensor < ordinal_type, value_type > > | computeTripleProductTensorNew (ordinal_type order) const |
| Compute triple product tensor using new algorithm. More... | |
Protected Attributes | |
| std::string | name |
| Name of basis. More... | |
| ordinal_type | p |
| Total order of basis. More... | |
| ordinal_type | d |
| Total dimension of basis. More... | |
| ordinal_type | sz |
| Total size of basis. More... | |
| Teuchos::Array< Teuchos::RCP < const OneDOrthogPolyBasis < ordinal_type, value_type > > > | bases |
| Array of bases. More... | |
| Teuchos::Array< ordinal_type > | basis_orders |
| Array storing order of each basis. More... | |
| value_type | sparse_tol |
| Tolerance for computing sparse Cijk. More... | |
| bool | use_old_cijk_alg |
| Use old algorithm for computing Cijk. More... | |
| Teuchos::RCP< Teuchos::Array < value_type > > | deriv_coeffs |
| Coefficients for derivative. More... | |
| Teuchos::Array< value_type > | norms |
| Norms. More... | |
| Teuchos::Array< MultiIndex < ordinal_type > > | terms |
| 2-D array of basis terms More... | |
| Teuchos::Array< ordinal_type > | num_terms |
| Number of terms up to each order. More... | |
| Teuchos::Array< Teuchos::Array < value_type > > | basis_eval_tmp |
| Temporary array used in basis evaluation. More... | |
Private Member Functions | |
| CompletePolynomialBasis (const CompletePolynomialBasis &) | |
| CompletePolynomialBasis & | operator= (const CompletePolynomialBasis &b) |
Implementation of Stokhos::OrthogPolyBasis methods | |
| ordinal_type | order () const |
| Return order of basis. More... | |
| ordinal_type | dimension () const |
| Return dimension of basis. More... | |
| virtual ordinal_type | size () const |
| Return total size of basis. More... | |
| virtual const Teuchos::Array < value_type > & | norm_squared () const |
| Return array storing norm-squared of each basis polynomial. More... | |
| virtual const value_type & | norm_squared (ordinal_type i) const |
Return norm squared of basis polynomial i. More... | |
| virtual Teuchos::RCP < Stokhos::Sparse3Tensor < ordinal_type, value_type > > | computeTripleProductTensor () const |
| Compute triple product tensor. More... | |
| virtual Teuchos::RCP < Stokhos::Sparse3Tensor < ordinal_type, value_type > > | computeLinearTripleProductTensor () const |
| Compute linear triple product tensor where k = 0,1,..,d. More... | |
| virtual value_type | evaluateZero (ordinal_type i) const |
Evaluate basis polynomial i at zero. More... | |
| virtual void | evaluateBases (const Teuchos::ArrayView< const value_type > &point, Teuchos::Array< value_type > &basis_vals) const |
Evaluate basis polynomials at given point point. More... | |
| virtual void | print (std::ostream &os) const |
Print basis to stream os. More... | |
| virtual const std::string & | getName () const |
| Return string name of basis. More... | |
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. More... | |
| virtual ordinal_type | index (const MultiIndex< ordinal_type > &term) const |
| Get index of the multivariate polynomial given orders of each coordinate. More... | |
| Teuchos::Array< Teuchos::RCP < const OneDOrthogPolyBasis < ordinal_type, value_type > > > | getCoordinateBases () const |
| Return coordinate bases. More... | |
| virtual MultiIndex< ordinal_type > | getMaxOrders () const |
| Return maximum order allowable for each coordinate basis. More... | |
Implementation of Stokhos::DerivBasis methods | |
| 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 . More... | |
| virtual Teuchos::RCP < Teuchos::SerialDenseMatrix < ordinal_type, value_type > > | computeDerivDoubleProductTensor () const |
Compute double product tensor where represents the derivative of in the direction . More... | |
Multivariate orthogonal polynomial basis generated from a total-order complete-polynomial tensor product of univariate polynomials.
The multivariate polynomials are given by
where
is the dimension of the basis and
, where
is the order of the basis. The size of the basis is given by
.
NOTE: Currently all coordinate bases must be of the samer order
.
Definition at line 40 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Definition at line 213 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Short-hand for Cijk.
Definition at line 255 of file Stokhos_CompletePolynomialBasis.hpp.
| 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. |
Definition at line 14 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Destructor.
Definition at line 72 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
private |
|
virtual |
Return order of basis.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 79 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Return dimension of basis.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 87 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Return total size of basis.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 95 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Return array storing norm-squared of each basis polynomial.
Entry
of returned array is given by
for
where
is size()-1.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 103 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Return norm squared of basis polynomial i.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 111 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Compute triple product tensor.
The
entry of the tensor
is given by
where
represents basis polynomial
and
where
is size()-1.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 119 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Compute linear triple product tensor where k = 0,1,..,d.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 133 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Evaluate basis polynomial i at zero.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 420 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
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 >.
Definition at line 434 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Print basis to stream os.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 452 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Return string name of basis.
Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.
Definition at line 483 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Get orders of each coordinate polynomial given an index i.
The returned array is of size
, where
is the dimension of the basis, and entry
is given by
where
.
Implements Stokhos::ProductBasis< ordinal_type, value_type >.
Definition at line 467 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Get index of the multivariate polynomial given orders of each coordinate.
Given the array term storing
, returns the index
such that
.
Implements Stokhos::ProductBasis< ordinal_type, value_type >.
Definition at line 475 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Return coordinate bases.
Array is of size dimension().
Implements Stokhos::ProductBasis< ordinal_type, value_type >.
Definition at line 491 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Return maximum order allowable for each coordinate basis.
Implements Stokhos::ProductBasis< ordinal_type, value_type >.
Definition at line 499 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Compute triple product tensor
where
represents the derivative of
in the direction
.
The definition of
is defined by the deriv_coeffs constructor argument.
Implements Stokhos::DerivBasis< ordinal_type, value_type >.
Definition at line 346 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
virtual |
Compute double product tensor
where
represents the derivative of
in the direction
.
The definition of
is defined by the deriv_coeffs constructor argument.
Implements Stokhos::DerivBasis< ordinal_type, value_type >.
Definition at line 383 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
protectedvirtual |
Compute triple product tensor using old algorithm.
Definition at line 147 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
protectedvirtual |
Compute triple product tensor using new algorithm.
Definition at line 178 of file Stokhos_CompletePolynomialBasisImp.hpp.
|
private |
|
protected |
Name of basis.
Definition at line 216 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Total order of basis.
Definition at line 219 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Total dimension of basis.
Definition at line 222 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Total size of basis.
Definition at line 225 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Array of bases.
Definition at line 228 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Array storing order of each basis.
Definition at line 231 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Tolerance for computing sparse Cijk.
Definition at line 234 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Use old algorithm for computing Cijk.
Definition at line 237 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Coefficients for derivative.
Definition at line 240 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Norms.
Definition at line 243 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
2-D array of basis terms
Definition at line 246 of file Stokhos_CompletePolynomialBasis.hpp.
|
protected |
Number of terms up to each order.
Definition at line 249 of file Stokhos_CompletePolynomialBasis.hpp.
|
mutableprotected |
Temporary array used in basis evaluation.
Definition at line 252 of file Stokhos_CompletePolynomialBasis.hpp.
1.8.5