Stokhos Development
Loading...
Searching...
No Matches
Stokhos::ProductContainer< coeff_type > Class Template Reference

A product (in the mathematical sense) container class whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor. More...

#include <Stokhos_ProductContainer.hpp>

Inheritance diagram for Stokhos::ProductContainer< coeff_type >:

Public Types

typedef Stokhos::ProductContainerTraits< coeff_type > traits_type
 Typename of traits.
typedef traits_type::value_type value_type
 Typename of values.
typedef traits_type::ordinal_type ordinal_type
 Typename of ordinals.

Public Member Functions

 ProductContainer ()
 Default constructor.
 ProductContainer (const Teuchos::RCP< const Epetra_BlockMap > &map)
 Create a container with container map map.
 ProductContainer (const Teuchos::RCP< const Epetra_BlockMap > &map, const typename traits_type::cloner_type &cloner)
 Create a container container map map where each coefficient is generated through a clone operation as implemented by the traits class for the coefficient.
 ProductContainer (const ProductContainer &)
 Copy constructor.
virtual ~ProductContainer ()
 Destructor.
ProductContaineroperator= (const ProductContainer &)
 Assignment.
void reset (const Teuchos::RCP< const Epetra_BlockMap > &map)
 Resize to new map map.
void reset (const Teuchos::RCP< const Epetra_BlockMap > &map, const typename traits_type::cloner_type &cloner)
 Resize to new map map and create coefficients from cloner.
void resize (const Teuchos::RCP< const Epetra_BlockMap > &map)
 Resize to map map.
void reserve (ordinal_type sz)
 Reserve space for a size sz container.
ordinal_type size () const
 Return size.
Teuchos::RCP< const Epetra_BlockMap > map () const
 Return container map.
const Teuchos::Array< Teuchos::RCP< coeff_type > > & getCoefficients () const
 Return array of coefficients.
Teuchos::Array< Teuchos::RCP< coeff_type > > & getCoefficients ()
 Return array of coefficients.
Teuchos::RCP< coeff_type > getCoeffPtr (ordinal_type i)
 Return ref-count pointer to coefficient i.
Teuchos::RCP< const coeff_type > getCoeffPtr (ordinal_type i) const
 Return ref-count pointer to constant coefficient i.
void setCoeffPtr (ordinal_type i, const Teuchos::RCP< coeff_type > &c)
 Set coefficient i to c.
coeff_type & operator[] (ordinal_type i)
 Array access.
const coeff_type & operator[] (ordinal_type i) const
 Array access.
void init (const value_type &val)
 Initialize coefficients.
bool myGID (int i) const
 Return whether global index i resides on this processor.
std::ostream & print (std::ostream &os) const
 Print polynomial.

Protected Attributes

Teuchos::RCP< const Epetra_BlockMap > map_
 Container map.
Teuchos::Array< Teuchos::RCP< coeff_type > > coeff_
 Array of polynomial coefficients.

Detailed Description

template<typename coeff_type>
class Stokhos::ProductContainer< coeff_type >

A product (in the mathematical sense) container class whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.

Constructor & Destructor Documentation

◆ ProductContainer() [1/4]

template<typename coeff_type>
Stokhos::ProductContainer< coeff_type >::ProductContainer ( )

Default constructor.

Use with care! Generally you will want to call reset() before using any of the methods on this class.

References coeff_, and map_.

Referenced by Stokhos::VectorOrthogPoly< coeff_type >::VectorOrthogPoly(), Stokhos::VectorOrthogPoly< coeff_type >::VectorOrthogPoly(), and Stokhos::VectorOrthogPoly< coeff_type >::VectorOrthogPoly().

◆ ProductContainer() [2/4]

template<typename coeff_type>
Stokhos::ProductContainer< coeff_type >::ProductContainer ( const Teuchos::RCP< const Epetra_BlockMap > & map)

Create a container with container map map.

References coeff_, and map_.

◆ ProductContainer() [3/4]

template<typename coeff_type>
Stokhos::ProductContainer< coeff_type >::ProductContainer ( const Teuchos::RCP< const Epetra_BlockMap > & map,
const typename traits_type::cloner_type & cloner )

Create a container container map map where each coefficient is generated through a clone operation as implemented by the traits class for the coefficient.

References coeff_, and map_.

◆ ProductContainer() [4/4]

template<typename coeff_type>
Stokhos::ProductContainer< coeff_type >::ProductContainer ( const ProductContainer< coeff_type > & v)

Copy constructor.

NOTE: This is a shallow copy

References coeff_, and map_.

Member Function Documentation

◆ getCoeffPtr() [1/2]

template<typename coeff_type>
Teuchos::RCP< coeff_type > Stokhos::ProductContainer< coeff_type >::getCoeffPtr ( ordinal_type i)

Return ref-count pointer to coefficient i.

Referenced by Stokhos::AdaptivityManager::setupOperator().

◆ getCoeffPtr() [2/2]

template<typename coeff_type>
Teuchos::RCP< const coeff_type > Stokhos::ProductContainer< coeff_type >::getCoeffPtr ( ordinal_type i) const

Return ref-count pointer to constant coefficient i.

References coeff_.

◆ init()

template<typename coeff_type>
void Stokhos::ProductContainer< coeff_type >::init ( const value_type & val)

Initialize coefficients.

References coeff_, and size().

Referenced by Stokhos::ResponseStatisticModelEvaluator::evalModel().

◆ myGID()

template<typename coeff_type>
bool Stokhos::ProductContainer< coeff_type >::myGID ( int i) const

Return whether global index i resides on this processor.

References map_.

◆ operator=()

template<typename coeff_type>
Stokhos::ProductContainer< coeff_type > & Stokhos::ProductContainer< coeff_type >::operator= ( const ProductContainer< coeff_type > & v)

◆ operator[]() [1/2]

template<typename coeff_type>
coeff_type & Stokhos::ProductContainer< coeff_type >::operator[] ( ordinal_type i)

Array access.

References coeff_.

◆ operator[]() [2/2]

template<typename coeff_type>
const coeff_type & Stokhos::ProductContainer< coeff_type >::operator[] ( ordinal_type i) const

Array access.

References coeff_.

◆ print()

template<typename coeff_type>
std::ostream & Stokhos::ProductContainer< coeff_type >::print ( std::ostream & os) const

Print polynomial.

References coeff_, map_, and size().

Referenced by Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::print().

◆ reserve()

template<typename coeff_type>
void Stokhos::ProductContainer< coeff_type >::reserve ( ordinal_type sz)

Reserve space for a size sz container.

Coefficients are preserved.

◆ reset() [1/2]

template<typename coeff_type>
void Stokhos::ProductContainer< coeff_type >::reset ( const Teuchos::RCP< const Epetra_BlockMap > & map)

◆ reset() [2/2]

template<typename coeff_type>
void Stokhos::ProductContainer< coeff_type >::reset ( const Teuchos::RCP< const Epetra_BlockMap > & map,
const typename traits_type::cloner_type & cloner )

Resize to new map map and create coefficients from cloner.

Any previous coefficients are lost.

◆ resize()

template<typename coeff_type>
void Stokhos::ProductContainer< coeff_type >::resize ( const Teuchos::RCP< const Epetra_BlockMap > & map)

Resize to map map.

Coefficients are preserved.

References map_.

Referenced by Stokhos::ProductBasisUtils::buildProductBasis(), Stokhos::PecosOneDOrthogPolyBasis< ordinal_type, value_type >::computeDerivDoubleProductTensor(), Stokhos::RecurrenceBasis< ordinal_type, value_type >::computeDerivDoubleProductTensor(), Stokhos::CPQR_Householder3(), Stokhos::Sparse3Tensor< ordinal_type, value_type >::fillComplete(), Stokhos::ClenshawCurtisLegendreBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::GaussPattersonLegendreBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::HouseTriDiagPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::LanczosPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::LanczosProjPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::MonoProjPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::PecosOneDOrthogPolyBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::StieltjesBasis< ordinal_type, value_type, func_type >::getQuadPoints(), Stokhos::StieltjesPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::HouseTriDiagPCEBasis< ordinal_type, value_type >::HouseTriDiagPCEBasis(), Stokhos::MonoProjPCEBasis< ordinal_type, value_type >::MonoProjPCEBasis(), Stokhos::QR_Householder(), Stokhos::LanczosPCEBasis< ordinal_type, value_type >::setup(), Stokhos::StieltjesBasis< ordinal_type, value_type, func_type >::setup(), Stokhos::StieltjesPCEBasis< ordinal_type, value_type >::setup(), Stokhos::svd(), Stokhos::TensorProductQuadrature< ordinal_type, value_type >::TensorProductQuadrature(), Stokhos::TensorProductQuadrature< ordinal_type, value_type >::TensorProductQuadrature(), and Stokhos::ProductContainer< Epetra_MultiVector >::~ProductContainer().

◆ setCoeffPtr()

template<typename coeff_type>
void Stokhos::ProductContainer< coeff_type >::setCoeffPtr ( ordinal_type i,
const Teuchos::RCP< coeff_type > & c )

Set coefficient i to c.

References coeff_.

◆ size()

template<typename coeff_type>
Stokhos::ProductContainer< coeff_type >::ordinal_type Stokhos::ProductContainer< coeff_type >::size ( ) const

Return size.

Referenced by Stokhos::AnisoSparseGridQuadrature< ordinal_type, value_type >::AnisoSparseGridQuadrature(), Stokhos::PseudoSpectralOrthogPolyExpansion< ordinal_type, value_type, point_compare_type, node_type >::binary_op(), Stokhos::PseudoSpectralOrthogPolyExpansion< ordinal_type, value_type, point_compare_type, node_type >::binary_op(), Stokhos::QuadOrthogPolyExpansion< ordinal_type, value_type, node_type >::binary_op(), Stokhos::QuadOrthogPolyExpansion< ordinal_type, value_type, node_type >::binary_op(), Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::buildQ(), Stokhos::MonomialGramSchmidtPCEBasis< ordinal_type, value_type >::buildReducedBasis(), Stokhos::MonomialProjGramSchmidtPCEBasis< ordinal_type, value_type >::buildReducedBasis(), Belos::MultiVecTraits< typename Storage::value_type, Tpetra::MultiVector< Sacado::MP::Vector< Storage >, LO, GO, Node > >::CloneCopy(), Belos::MultiVecTraits< typename Storage::value_type, Tpetra::MultiVector< Sacado::MP::Vector< Storage >, LO, GO, Node > >::CloneCopy(), Belos::MultiVecTraits< typename Storage::value_type, Tpetra::MultiVector< Sacado::UQ::PCE< Storage >, LO, GO, Node > >::CloneCopy(), Belos::MultiVecTraits< typename Storage::value_type, Tpetra::MultiVector< Sacado::UQ::PCE< Storage >, LO, GO, Node > >::CloneCopy(), Stokhos::PecosOneDOrthogPolyBasis< ordinal_type, value_type >::computeDerivDoubleProductTensor(), Stokhos::RecurrenceBasis< ordinal_type, value_type >::computeDerivDoubleProductTensor(), Stokhos::SmolyakBasis< ordinal_type, value_type, coeff_compare_type >::computeLinearTripleProductTensor(), Stokhos::StieltjesBasis< ordinal_type, value_type, func_type >::computeRecurrenceCoefficients(), Stokhos::StieltjesPCEBasis< ordinal_type, value_type >::computeRecurrenceCoefficients(), Stokhos::StieltjesGramSchmidtBuilder< ordinal_type, value_type >::computeReducedPCEs(), Stokhos::AdaptivityManager::copyFromAdaptiveVector(), Stokhos::SGModelEvaluator_Interlaced::copyToInterlacedVector(), Stokhos::SGModelEvaluator_Interlaced::copyToPolyOrthogVector(), Stokhos::CPQR_Householder_threshold(), Stokhos::StieltjesBasis< ordinal_type, value_type, func_type >::evaluateRecurrence(), Stokhos::StieltjesPCEBasis< ordinal_type, value_type >::evaluateRecurrence(), Stokhos::HouseTriDiagPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::LanczosPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::LanczosProjPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::MonoProjPCEBasis< ordinal_type, value_type >::getQuadPoints(), Stokhos::StieltjesBasis< ordinal_type, value_type, func_type >::getQuadPoints(), Stokhos::StieltjesPCEBasis< ordinal_type, value_type >::getQuadPoints(), init(), Stokhos::StieltjesBasis< ordinal_type, value_type, func_type >::integrateBasisSquared(), Stokhos::StieltjesPCEBasis< ordinal_type, value_type >::integrateBasisSquared(), Stokhos::StieltjesPCEBasis< ordinal_type, value_type >::integrateBasisSquaredProj(), Stokhos::OrthogPolyApprox< OrdinalType, ValueType >::mean(), Stokhos::MonomialProjGramSchmidtPCEBasis2< ordinal_type, value_type >::MonomialProjGramSchmidtPCEBasis2(), Stokhos::RecurrenceBasis< ordinal_type, value_type >::normalizeRecurrenceCoefficients(), Stokhos::PCECovarianceOp::PCECovarianceOp(), Stokhos::OrthogPolyApprox< ordinal_type, value_type, storage_type >::print(), print(), Stokhos::SmolyakSparseGridQuadrature< ordinal_type, value_type, point_compare_type >::print(), Stokhos::SparseGridQuadrature< ordinal_type, value_type >::print(), Stokhos::TensorProductQuadrature< ordinal_type, value_type >::print(), Stokhos::UserDefinedQuadrature< ordinal_type, value_type >::print(), Stokhos::ProductLanczosGramSchmidtPCEBasis< ordinal_type, value_type >::ProductLanczosGramSchmidtPCEBasis(), Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::ProductLanczosPCEBasis(), Stokhos::QR_Householder(), Stokhos::LanczosPCEBasis< ordinal_type, value_type >::setup(), Stokhos::StieltjesBasis< ordinal_type, value_type, func_type >::setup(), Stokhos::StieltjesPCEBasis< ordinal_type, value_type >::setup(), Stokhos::ProductLanczosPCEBasis< ordinal_type, value_type >::size(), Stokhos::SparseArray< ordinal_type, value_type >::size(), Stokhos::SmolyakSparseGridQuadrature< ordinal_type, value_type, point_compare_type >::SmolyakSparseGridQuadrature(), Stokhos::SparseGridQuadrature< ordinal_type, value_type >::SparseGridQuadrature(), Stokhos::TensorProductQuadrature< ordinal_type, value_type >::TensorProductQuadrature(), Stokhos::TensorProductQuadrature< ordinal_type, value_type >::TensorProductQuadrature(), and Stokhos::UserDefinedQuadrature< ordinal_type, value_type >::UserDefinedQuadrature().

Member Data Documentation

◆ coeff_

◆ map_


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