Stokhos
Development
|
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor. More...
#include <Stokhos_EpetraMultiVectorOrthogPoly.hpp>
Public Types | |
typedef double | value_type |
Typename of values. | |
typedef int | ordinal_type |
Typename of ordinals. | |
Public Types inherited from Stokhos::VectorOrthogPoly< Epetra_MultiVector > | |
typedef ProductContainer < Epetra_MultiVector > ::traits_type | traits_type |
Typename of traits. | |
typedef ProductContainer < Epetra_MultiVector > ::value_type | value_type |
Typename of values. | |
typedef ProductContainer < Epetra_MultiVector > ::ordinal_type | ordinal_type |
Typename of ordinals. | |
Public Types inherited from Stokhos::ProductContainer< Epetra_MultiVector > | |
typedef Stokhos::ProductContainerTraits < Epetra_MultiVector > | 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 Types inherited from Stokhos::ProductEpetraMultiVector | |
typedef double | value_type |
Typename of values. | |
typedef int | ordinal_type |
Typename of ordinals. | |
Public Member Functions | |
EpetraMultiVectorOrthogPoly () | |
Constructor with no basis. More... | |
EpetraMultiVectorOrthogPoly (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &block_map) | |
Create a polynomial for basis basis with empty coefficients. | |
EpetraMultiVectorOrthogPoly (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, int num_vectors) | |
Create a polynomial for basis basis where each coefficient is generated from the supplied map. | |
EpetraMultiVectorOrthogPoly (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const Epetra_BlockMap > &product_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, int num_vectors) | |
Create a polynomial for basis basis where each coefficient is given by a created block vector. | |
EpetraMultiVectorOrthogPoly (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const Epetra_BlockMap > &product_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, Epetra_DataAccess CV, const Epetra_MultiVector &block_vector) | |
Create a polynomial for basis basis where each coefficient is given by the supplied block vector. | |
EpetraMultiVectorOrthogPoly (const EpetraMultiVectorOrthogPoly &v) | |
Copy constructor. More... | |
virtual | ~EpetraMultiVectorOrthogPoly () |
Destructor. | |
EpetraMultiVectorOrthogPoly & | operator= (const EpetraMultiVectorOrthogPoly &v) |
Assignment. More... | |
void | reset (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, int num_vectors) |
Reset to a new basis. More... | |
void | reset (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const Epetra_BlockMap > &product_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, int num_vectors) |
Reset to a new basis. More... | |
void | computeMean (Epetra_MultiVector &v) const |
Compute mean. | |
void | computeVariance (Epetra_MultiVector &v) const |
Compute variance. | |
void | computeStandardDeviation (Epetra_MultiVector &v) const |
Compute standard deviation. | |
Public Member Functions inherited from Stokhos::VectorOrthogPoly< Epetra_MultiVector > | |
VectorOrthogPoly () | |
Constructor with no basis. More... | |
VectorOrthogPoly (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &map) | |
Create a polynomial for basis basis with empty coefficients. | |
VectorOrthogPoly (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &basis, const Teuchos::RCP< const Epetra_BlockMap > &map, const typename traits_type::cloner_type &cloner) | |
Create a polynomial for basis basis where each coefficient is generated through a clone operation as implemented by the traits class for the coefficient. | |
VectorOrthogPoly (const VectorOrthogPoly &) | |
Copy constructor. More... | |
virtual | ~VectorOrthogPoly () |
Destructor. | |
VectorOrthogPoly & | operator= (const VectorOrthogPoly &) |
Assignment. More... | |
void | reset (const Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > &new_basis, const Teuchos::RCP< const Epetra_BlockMap > &new_map, const typename traits_type::cloner_type &cloner) |
Reset to a new basis. More... | |
Teuchos::RCP< const Stokhos::OrthogPolyBasis < ordinal_type, value_type > > | basis () const |
Get basis. | |
Epetra_MultiVector & | term (ordinal_type dimension, ordinal_type order) |
Get term for dimension dimension and order order . | |
const Epetra_MultiVector & | term (ordinal_type dimension, ordinal_type order) const |
Get term for dimension dimension and order order . | |
void | evaluate (const Teuchos::Array< value_type > &basis_values, Epetra_MultiVector &result) const |
Evaluate polynomial at supplied basis values. More... | |
void | sumIntoAllTerms (const value_type &weight, const Teuchos::Array< value_type > &basis_values, const Teuchos::Array< value_type > &basis_norms, const Epetra_MultiVector &vec) |
Evaluate polynomial at supplied basis values. | |
std::ostream & | print (std::ostream &os) const |
Print polynomial. | |
Public Member Functions inherited from Stokhos::ProductContainer< Epetra_MultiVector > | |
ProductContainer () | |
Default constructor. More... | |
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. More... | |
virtual | ~ProductContainer () |
Destructor. | |
ProductContainer & | operator= (const ProductContainer &) |
Assignment. More... | |
void | reset (const Teuchos::RCP< const Epetra_BlockMap > &map) |
Resize to new map map . More... | |
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 . More... | |
void | resize (const Teuchos::RCP< const Epetra_BlockMap > &map) |
Resize to map map . More... | |
void | reserve (ordinal_type sz) |
Reserve space for a size sz container. More... | |
ordinal_type | size () const |
Return size. | |
Teuchos::RCP< const Epetra_BlockMap > | map () const |
Return container map. | |
const Teuchos::Array < Teuchos::RCP < Epetra_MultiVector > > & | getCoefficients () const |
Return array of coefficients. | |
Teuchos::Array< Teuchos::RCP < Epetra_MultiVector > > & | getCoefficients () |
Return array of coefficients. | |
Teuchos::RCP< Epetra_MultiVector > | getCoeffPtr (ordinal_type i) |
Return ref-count pointer to coefficient i . | |
Teuchos::RCP< const Epetra_MultiVector > | getCoeffPtr (ordinal_type i) const |
Return ref-count pointer to constant coefficient i . | |
void | setCoeffPtr (ordinal_type i, const Teuchos::RCP< Epetra_MultiVector > &c) |
Set coefficient i to c . | |
Epetra_MultiVector & | operator[] (ordinal_type i) |
Array access. | |
const Epetra_MultiVector & | 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. | |
Public Member Functions inherited from Stokhos::ProductEpetraMultiVector | |
ProductEpetraMultiVector () | |
Default constructor. More... | |
ProductEpetraMultiVector (const Teuchos::RCP< const Epetra_BlockMap > &block_map) | |
Create a container with container map block_map . | |
ProductEpetraMultiVector (const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, int num_vectors) | |
Create a container with container map block_map where each coefficient is generated from the supplied coefficient map coeff_map . | |
ProductEpetraMultiVector (const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const Epetra_BlockMap > &product_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, int num_vectors) | |
Create a container with container map block_map where each coefficient is generated from the supplied coefficient map coeff_map . | |
ProductEpetraMultiVector (const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const Epetra_BlockMap > &product_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, Epetra_DataAccess CV, const Epetra_MultiVector &block_vector) | |
Create a container with container map block_map where each coefficient is given by the supplied block vector. | |
ProductEpetraMultiVector (const ProductEpetraMultiVector &v) | |
Copy constructor. More... | |
virtual | ~ProductEpetraMultiVector () |
Destructor. | |
ProductEpetraMultiVector & | operator= (const ProductEpetraMultiVector &v) |
Assignment. More... | |
ProductEpetraMultiVector & | operator= (const Epetra_MultiVector &v) |
Assignment. | |
void | assignToBlockMultiVector (Epetra_MultiVector &v) const |
Assignment. | |
void | assignFromBlockMultiVector (const Epetra_MultiVector &v) |
Assignment. | |
Teuchos::RCP< const Epetra_BlockMap > | coefficientMap () const |
Get coefficient map. | |
Teuchos::RCP< const Epetra_BlockMap > | productMap () const |
Get product map. | |
Teuchos::RCP< const EpetraExt::MultiComm > | productComm () const |
Get product comm. | |
int | numVectors () const |
Get number of vectors. | |
void | reset (const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, int num_vectors) |
Reset to a new size. More... | |
void | reset (const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const Epetra_BlockMap > &product_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm, int num_vectors) |
Reset to a new size. More... | |
void | resetCoefficients (Epetra_DataAccess CV, const Epetra_MultiVector &block_vector) |
Reset vector cofficients. | |
Teuchos::RCP < EpetraExt::BlockMultiVector > | getBlockMultiVector () |
Get block vector. | |
Teuchos::RCP< const EpetraExt::BlockMultiVector > | getBlockMultiVector () const |
Get block vector. | |
void | setBlockMultiVector (const Teuchos::RCP< EpetraExt::BlockMultiVector > &block_vec) |
Set block vector. | |
Additional Inherited Members | |
Protected Attributes inherited from Stokhos::VectorOrthogPoly< Epetra_MultiVector > | |
Teuchos::RCP< const Stokhos::OrthogPolyBasis < ordinal_type, value_type > > | basis_ |
Basis. | |
Protected Attributes inherited from Stokhos::ProductContainer< Epetra_MultiVector > | |
Teuchos::RCP< const Epetra_BlockMap > | map_ |
Container map. | |
Teuchos::Array< Teuchos::RCP < Epetra_MultiVector > > | coeff_ |
Array of polynomial coefficients. | |
Protected Attributes inherited from Stokhos::ProductEpetraMultiVector | |
Teuchos::RCP< const Epetra_BlockMap > | coeff_map |
Product map of block vector. | |
Teuchos::RCP< const EpetraExt::MultiComm > | product_comm |
Product multi-level communicator. | |
Teuchos::RCP< const Epetra_BlockMap > | product_map |
Product map of block vector. | |
Teuchos::RCP < EpetraExt::BlockMultiVector > | bv |
Block vector storing coefficients. | |
A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.
Stokhos::EpetraMultiVectorOrthogPoly::EpetraMultiVectorOrthogPoly | ( | ) |
Constructor with no basis.
Use with care! Generally you will want to call reset() before using any of the methods on this class.
Stokhos::EpetraMultiVectorOrthogPoly::EpetraMultiVectorOrthogPoly | ( | const EpetraMultiVectorOrthogPoly & | v | ) |
Copy constructor.
NOTE: This is a shallow copy
Stokhos::EpetraMultiVectorOrthogPoly & Stokhos::EpetraMultiVectorOrthogPoly::operator= | ( | const EpetraMultiVectorOrthogPoly & | v | ) |
Assignment.
NOTE: This is a shallow copy
References Stokhos::VectorOrthogPoly< coeff_type >::basis_, and Stokhos::ProductEpetraMultiVector::operator=().
void Stokhos::EpetraMultiVectorOrthogPoly::reset | ( | const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > & | basis, |
const Teuchos::RCP< const Epetra_BlockMap > & | block_map, | ||
const Teuchos::RCP< const Epetra_BlockMap > & | coeff_map, | ||
const Teuchos::RCP< const EpetraExt::MultiComm > & | product_comm, | ||
int | num_vectors | ||
) |
Reset to a new basis.
This resizes array to fit new basis.
References Stokhos::ProductEpetraMultiVector::reset().
void Stokhos::EpetraMultiVectorOrthogPoly::reset | ( | const Teuchos::RCP< const Stokhos::OrthogPolyBasis< int, double > > & | basis, |
const Teuchos::RCP< const Epetra_BlockMap > & | block_map, | ||
const Teuchos::RCP< const Epetra_BlockMap > & | coeff_map, | ||
const Teuchos::RCP< const Epetra_BlockMap > & | product_map, | ||
const Teuchos::RCP< const EpetraExt::MultiComm > & | product_comm, | ||
int | num_vectors | ||
) |
Reset to a new basis.
This resizes array to fit new basis.
References Stokhos::ProductEpetraMultiVector::reset().