Stokhos Development
Loading...
Searching...
No Matches
Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type > Class Template Reference

Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product measure induced by these expansions. More...

#include <Stokhos_ProductLanczosPCEBasis.hpp>

Inheritance diagram for Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >:
Collaboration diagram for Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >:

Public Member Functions

 ProductLanczosPCEBasis (ordinal_type p, const Teuchos::Array< Stokhos::OrthogPolyApprox< ordinal_type, value_type > > &pce, const Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > &quad, const Teuchos::RCP< const Stokhos::Sparse3Tensor< ordinal_type, value_type > > &Cijk, const Teuchos::ParameterList &params=Teuchos::ParameterList())
 Constructor.
virtual ~ProductLanczosPCEBasis ()
 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_typenorm_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_typegetMaxOrders () const
 Return maximum order allowable for each coordinate basis.
Public Member Functions inherited from Stokhos::ProductBasis< ordinal_type, value_type >
 ProductBasis ()
 Constructor.
virtual ~ProductBasis ()
 Destructor.
Public Member Functions inherited from Stokhos::OrthogPolyBasis< ordinal_type, value_type >
 OrthogPolyBasis ()
 Constructor.
virtual ~OrthogPolyBasis ()
 Destructor.
Public Member Functions inherited from Stokhos::ReducedPCEBasis< ordinal_type, value_type >
 ReducedPCEBasis ()
 Default constructor.
virtual ~ReducedPCEBasis ()
 Destructor.

Implementation of Stokhos::ReducedPCEBasis methods

typedef Teuchos::SerialDenseVector< ordinal_type, value_typeSDV
typedef Teuchos::SerialDenseMatrix< ordinal_type, value_typeSDM
std::string name
 Name of basis.
Teuchos::ParameterList params
 Algorithm parameters.
Teuchos::RCP< Stokhos::CompletePolynomialBasis< ordinal_type, value_type > > tensor_lanczos_basis
 Product Lanczos basis.
SDM Phi
 Values of transformed basis at quadrature points.
SDM A
 Transition matrix from reduced basis to original.
SDM Ainv
 Projection matrix from original matrix to reduced.
Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > reduced_quad
 Reduced quadrature object.
Stokhos::OrthogPolyApprox< ordinal_type, value_typetmp_pce
 Temporary pce used in invariant subspace calculations.
virtual void transformToOriginalBasis (const value_type *in, value_type *out, ordinal_type ncol=1, bool transpose=false) const
 Transform coefficients to original basis from this basis.
virtual void transformFromOriginalBasis (const value_type *in, value_type *out, ordinal_type ncol=1, bool transpose=false) const
 Transform coefficients from original basis to this basis.
virtual Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > getReducedQuadrature () const
 Get reduced quadrature object.
ordinal_type isInvariant (const Stokhos::OrthogPolyApprox< ordinal_type, value_type > &pce) const

Detailed Description

template<typename ordinal_type, typename value_type>
class Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >

Generate a basis from a given set of PCE expansions that is orthogonal with respect to the product measure induced by these expansions.

Given the PCE expansions, first build a an orthogonal basis for each compnent, then form the multivariate basis by a total-order tensor product. The resulting basis is not necessarily orthogonal with respect to the full measure.

Constructor & Destructor Documentation

◆ ProductLanczosPCEBasis()

template<typename ordinal_type, typename value_type>
Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::ProductLanczosPCEBasis ( ordinal_type p,
const Teuchos::Array< Stokhos::OrthogPolyApprox< ordinal_type, value_type > > & pce,
const Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > & quad,
const Teuchos::RCP< const Stokhos::Sparse3Tensor< ordinal_type, value_type > > & Cijk,
const Teuchos::ParameterList & params = Teuchos::ParameterList() )

Constructor.

Parameters
porder of the basis
pcepolynomial chaos expansions defining new measure
Cijksparse triple product tensor for basis defining pce

References A, Ainv, Stokhos::QuadratureFactory< ordinal_type, value_type >::create(), name, params, Phi, reduced_quad, Stokhos::ProductContainer< coeff_type >::size(), and tensor_lanczos_basis.

Member Function Documentation

◆ computeLinearTripleProductTensor()

template<typename ordinal_type, typename value_type>
Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::computeLinearTripleProductTensor ( ) const
virtual

Compute linear triple product tensor where k = 0,1,..,d.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ computeTripleProductTensor()

template<typename ordinal_type, typename value_type>
Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::computeTripleProductTensor ( ) const
virtual

Compute triple product tensor.

The $(i,j,k)$ entry of the tensor $C_{ijk}$ is given by $C_{ijk} = \langle\Psi_i\Psi_j\Psi_k\rangle$ where $\Psi_l$ represents basis polynomial $l$ and $i,j,k=0,\dots,P$ where $P$ is size()-1.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ dimension()

template<typename ordinal_type, typename value_type>
ordinal_type Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::dimension ( ) const
virtual

Return dimension of basis.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ evaluateBases()

template<typename ordinal_type, typename value_type>
void Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::evaluateBases ( const Teuchos::ArrayView< const value_type > & point,
Teuchos::Array< value_type > & basis_vals ) const
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 >.

References tensor_lanczos_basis.

◆ evaluateZero()

template<typename ordinal_type, typename value_type>
value_type Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::evaluateZero ( ordinal_type i) const
virtual

Evaluate basis polynomial i at zero.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ getCoordinateBases()

template<typename ordinal_type, typename value_type>
Teuchos::Array< Teuchos::RCP< const Stokhos::OneDOrthogPolyBasis< ordinal_type, value_type > > > Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::getCoordinateBases ( ) const
virtual

Return coordinate bases.

Array is of size dimension().

Implements Stokhos::ProductBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ getMaxOrders()

template<typename ordinal_type, typename value_type>
Stokhos::MultiIndex< ordinal_type > Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::getMaxOrders ( ) const
virtual

Return maximum order allowable for each coordinate basis.

Implements Stokhos::ProductBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ getName()

template<typename ordinal_type, typename value_type>
const std::string & Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::getName ( ) const
virtual

Return string name of basis.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References name.

◆ getReducedQuadrature()

template<typename ordinal_type, typename value_type>
Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::getReducedQuadrature ( ) const
virtual

Get reduced quadrature object.

Implements Stokhos::ReducedPCEBasis< ordinal_type, value_type >.

References reduced_quad.

◆ index()

template<typename ordinal_type, typename value_type>
ordinal_type Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::index ( const MultiIndex< ordinal_type > & term) const
virtual

Get index of the multivariate polynomial given orders of each coordinate.

Given the array term storing $i_1,\dots,\i_d$, returns the index $i$ such that $\Psi_i(x) = \psi_{i_1}(x_1)\dots\psi_{i_d}(x_d)$.

Implements Stokhos::ProductBasis< ordinal_type, value_type >.

References tensor_lanczos_basis, and term().

◆ norm_squared() [1/2]

template<typename ordinal_type, typename value_type>
const Teuchos::Array< value_type > & Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::norm_squared ( ) const
virtual

Return array storing norm-squared of each basis polynomial.

Entry $l$ of returned array is given by $\langle\Psi_l^2\rangle$ for $l=0,\dots,P$ where $P$ is size()-1.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ norm_squared() [2/2]

template<typename ordinal_type, typename value_type>
const value_type & Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::norm_squared ( ordinal_type i) const
virtual

Return norm squared of basis polynomial i.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ order()

template<typename ordinal_type, typename value_type>
ordinal_type Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::order ( ) const
virtual

Return order of basis.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ print()

template<typename ordinal_type, typename value_type>
void Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::print ( std::ostream & os) const
virtual

Print basis to stream os.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ size()

template<typename ordinal_type, typename value_type>
ordinal_type Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::size ( ) const
virtual

Return total size of basis.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

◆ term()

Get orders of each coordinate polynomial given an index i.

The returned array is of size $d$, where $d$ is the dimension of the basis, and entry $l$ is given by $i_l$ where $\Psi_i(x) = \psi_{i_1}(x_1)\dots\psi_{i_d}(x_d)$.

Implements Stokhos::ProductBasis< ordinal_type, value_type >.

References tensor_lanczos_basis.

Referenced by index().

◆ transformFromOriginalBasis()

template<typename ordinal_type, typename value_type>
void Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::transformFromOriginalBasis ( const value_type * in,
value_type * out,
ordinal_type ncol = 1,
bool transpose = false ) const
virtual

Transform coefficients from original basis to this basis.

Implements Stokhos::ReducedPCEBasis< ordinal_type, value_type >.

References A, and Ainv.

◆ transformToOriginalBasis()

template<typename ordinal_type, typename value_type>
void Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::transformToOriginalBasis ( const value_type * in,
value_type * out,
ordinal_type ncol = 1,
bool transpose = false ) const
virtual

Transform coefficients to original basis from this basis.

Implements Stokhos::ReducedPCEBasis< ordinal_type, value_type >.

References A.


The documentation for this class was generated from the following files: