Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
Stokhos::MonomialProjGramSchmidtPCEBasis2< 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_MonomialProjGramSchmidtPCEBasis2.hpp>

Inheritance diagram for Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >:
Inheritance graph
[legend]

Public Member Functions

 MonomialProjGramSchmidtPCEBasis2 (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::ParameterList &params=Teuchos::ParameterList())
 Constructor. More...
 
virtual ~MonomialProjGramSchmidtPCEBasis2 ()
 Destructor. More...
 
- Public Member Functions inherited from Stokhos::ReducedPCEBasis< ordinal_type, value_type >
 ReducedPCEBasis ()
 Default constructor. More...
 
virtual ~ReducedPCEBasis ()
 Destructor. More...
 
- Public Member Functions inherited from Stokhos::OrthogPolyBasis< ordinal_type, value_type >
 OrthogPolyBasis ()
 Constructor. More...
 
virtual ~OrthogPolyBasis ()
 Destructor. More...
 

Protected Types

typedef
Stokhos::CompletePolynomialBasisUtils
< ordinal_type, value_type > 
CPBUtils
 
typedef
Teuchos::SerialDenseVector
< ordinal_type, value_type > 
SDV
 
typedef
Teuchos::SerialDenseMatrix
< ordinal_type, value_type > 
SDM
 

Protected Member Functions

ordinal_type buildQ (ordinal_type max_p, value_type threshold, const Teuchos::Array< Stokhos::OrthogPolyApprox< ordinal_type, value_type > > &pce, const Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > &quad, Teuchos::Array< Stokhos::MultiIndex< ordinal_type > > &terms_, Teuchos::Array< ordinal_type > &num_terms_, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &Qp_, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &A_, Teuchos::SerialDenseMatrix< ordinal_type, value_type > &F_)
 Build the reduced basis, parameterized by total order max_p. More...
 

Protected Attributes

std::string name
 Name of basis. More...
 
Teuchos::ParameterList params
 Algorithm parameters. More...
 
Teuchos::RCP< const
Stokhos::OrthogPolyBasis
< ordinal_type, value_type > > 
pce_basis
 Original pce basis. More...
 
ordinal_type pce_sz
 Size of original pce 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
< Stokhos::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< value_type > norms
 Norms. More...
 
SDM Q
 Values of transformed basis at quadrature points. More...
 
SDM Qp
 Coefficients of transformed basis in original basis. More...
 
Teuchos::RCP< const
Stokhos::Quadrature
< ordinal_type, value_type > > 
reduced_quad
 Reduced quadrature object. More...
 
bool verbose
 Whether to print a bunch of stuff out. More...
 
value_type rank_threshold
 Rank threshold. More...
 
std::string orthogonalization_method
 Orthogonalization method. More...
 
Teuchos::BLAS< ordinal_type,
value_type > 
blas
 

Private Member Functions

 MonomialProjGramSchmidtPCEBasis2 (const MonomialProjGramSchmidtPCEBasis2 &)
 
MonomialProjGramSchmidtPCEBasis2operator= (const MonomialProjGramSchmidtPCEBasis2 &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 const std::string & getName () const
 Return string name of basis. More...
 
virtual void print (std::ostream &os) const
 Print basis to stream os. More...
 

Implementation of Stokhos::ReducedPCEBasis methods

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. More...
 
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. More...
 
virtual Teuchos::RCP< const
Stokhos::Quadrature
< ordinal_type, value_type > > 
getReducedQuadrature () const
 Get reduced quadrature object. More...
 

Detailed Description

template<typename ordinal_type, typename value_type>
class Stokhos::MonomialProjGramSchmidtPCEBasis2< 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 non-orthogonal monomial basis. Orthogonalize this basis using Gram-Schmidt, then build a quadrature rule using the simplex method.

Definition at line 69 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

Member Typedef Documentation

template<typename ordinal_type , typename value_type >
typedef Stokhos::CompletePolynomialBasisUtils<ordinal_type,value_type> Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::CPBUtils
protected
template<typename ordinal_type , typename value_type >
typedef Teuchos::SerialDenseVector<ordinal_type,value_type> Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::SDV
protected
template<typename ordinal_type , typename value_type >
typedef Teuchos::SerialDenseMatrix<ordinal_type,value_type> Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::SDM
protected

Constructor & Destructor Documentation

template<typename ordinal_type , typename value_type >
Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::MonomialProjGramSchmidtPCEBasis2 ( 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::ParameterList params = Teuchos::ParameterList() 
)

Constructor.

Parameters
porder of the basis
pcepolynomial chaos expansions defining new measure
quadquadrature data for basis defining pce
Cijksparse triple product tensor for basis defining pce
sparse_toltolerance for dropping terms in sparse tensors

Definition at line 50 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::~MonomialProjGramSchmidtPCEBasis2 ( )
virtual

Destructor.

Definition at line 288 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::MonomialProjGramSchmidtPCEBasis2 ( const MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type > &  )
private

Member Function Documentation

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

Return dimension of basis.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

Definition at line 303 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

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

Return total size of basis.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

Definition at line 311 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
const Teuchos::Array< value_type > & Stokhos::MonomialProjGramSchmidtPCEBasis2< 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 >.

Definition at line 319 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
const value_type & Stokhos::MonomialProjGramSchmidtPCEBasis2< 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 >.

Definition at line 327 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
Teuchos::RCP< Stokhos::Sparse3Tensor< ordinal_type, value_type > > Stokhos::MonomialProjGramSchmidtPCEBasis2< 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 >.

Definition at line 335 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

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

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

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

Definition at line 344 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

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

Evaluate basis polynomial i at zero.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

Definition at line 353 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
void Stokhos::MonomialProjGramSchmidtPCEBasis2< 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 >.

Definition at line 361 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

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

Return string name of basis.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

Definition at line 370 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

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

Print basis to stream os.

Implements Stokhos::OrthogPolyBasis< ordinal_type, value_type >.

Definition at line 378 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
void Stokhos::MonomialProjGramSchmidtPCEBasis2< 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 >.

Definition at line 392 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
void Stokhos::MonomialProjGramSchmidtPCEBasis2< 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 >.

Definition at line 414 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

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

Get reduced quadrature object.

Implements Stokhos::ReducedPCEBasis< ordinal_type, value_type >.

Definition at line 436 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
ordinal_type Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::buildQ ( ordinal_type  max_p,
value_type  threshold,
const Teuchos::Array< Stokhos::OrthogPolyApprox< ordinal_type, value_type > > &  pce,
const Teuchos::RCP< const Stokhos::Quadrature< ordinal_type, value_type > > &  quad,
Teuchos::Array< Stokhos::MultiIndex< ordinal_type > > &  terms_,
Teuchos::Array< ordinal_type > &  num_terms_,
Teuchos::SerialDenseMatrix< ordinal_type, value_type > &  Qp_,
Teuchos::SerialDenseMatrix< ordinal_type, value_type > &  A_,
Teuchos::SerialDenseMatrix< ordinal_type, value_type > &  F_ 
)
protected

Build the reduced basis, parameterized by total order max_p.

Returns resulting size of reduced basis

Definition at line 181 of file Stokhos_MonomialProjGramSchmidtPCEBasis2Imp.hpp.

template<typename ordinal_type , typename value_type >
MonomialProjGramSchmidtPCEBasis2& Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::operator= ( const MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type > &  b)
private

Member Data Documentation

template<typename ordinal_type , typename value_type >
std::string Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::name
protected

Name of basis.

Definition at line 204 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
Teuchos::ParameterList Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::params
protected

Algorithm parameters.

Definition at line 207 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
Teuchos::RCP<const Stokhos::OrthogPolyBasis<ordinal_type,value_type> > Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::pce_basis
protected

Original pce basis.

Definition at line 210 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
ordinal_type Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::pce_sz
protected

Size of original pce basis.

Definition at line 213 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
ordinal_type Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::p
protected

Total order of basis.

Definition at line 216 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
ordinal_type Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::d
protected

Total dimension of basis.

Definition at line 219 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
ordinal_type Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::sz
protected

Total size of basis.

Definition at line 222 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
Teuchos::Array< Stokhos::MultiIndex<ordinal_type> > Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::terms
protected

2-D array of basis terms

Definition at line 225 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
Teuchos::Array<ordinal_type> Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::num_terms
protected

Number of terms up to each order.

Definition at line 228 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
Teuchos::Array<value_type> Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::norms
protected

Norms.

Definition at line 231 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
SDM Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::Q
protected

Values of transformed basis at quadrature points.

Definition at line 234 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
SDM Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::Qp
protected

Coefficients of transformed basis in original basis.

Definition at line 237 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
Teuchos::RCP<const Stokhos::Quadrature<ordinal_type, value_type> > Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::reduced_quad
protected

Reduced quadrature object.

Definition at line 240 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
bool Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::verbose
protected

Whether to print a bunch of stuff out.

Definition at line 243 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
value_type Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::rank_threshold
protected

Rank threshold.

Definition at line 246 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
std::string Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::orthogonalization_method
protected

Orthogonalization method.

Definition at line 249 of file Stokhos_MonomialProjGramSchmidtPCEBasis2.hpp.

template<typename ordinal_type , typename value_type >
Teuchos::BLAS<ordinal_type,value_type> Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::blas
protected

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