Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Stokhos::EpetraVectorOrthogPoly Class Reference

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_EpetraVectorOrthogPoly.hpp>

Inheritance diagram for Stokhos::EpetraVectorOrthogPoly:
Inheritance graph
[legend]

Public Types

typedef double value_type
 Typename of values.
 
typedef int ordinal_type
 Typename of ordinals.
 
- Public Types inherited from Stokhos::VectorOrthogPoly< Epetra_Vector >
typedef ProductContainer< Epetra_Vector >::traits_type traits_type
 Typename of traits.
 
typedef ProductContainer< Epetra_Vector >::value_type value_type
 Typename of values.
 
typedef ProductContainer< Epetra_Vector >::ordinal_type ordinal_type
 Typename of ordinals.
 
- Public Types inherited from Stokhos::ProductContainer< coeff_type >
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 Types inherited from Stokhos::ProductEpetraVector
typedef double value_type
 Typename of values.
 
typedef int ordinal_type
 Typename of ordinals.
 
- Public Types inherited from Stokhos::ProductContainer< Epetra_Vector >
typedef Stokhos::ProductContainerTraits< Epetra_Vectortraits_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

 EpetraVectorOrthogPoly ()
 Constructor with no basis.
 
 EpetraVectorOrthogPoly (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.
 
 EpetraVectorOrthogPoly (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)
 Create a polynomial for basis basis where each coefficient is generated from the supplied map.
 
 EpetraVectorOrthogPoly (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)
 Create a polynomial for basis basis where each coefficient is given by a created block vector.
 
 EpetraVectorOrthogPoly (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_Vector &block_vector)
 Create a polynomial for basis basis where each coefficient is given by the supplied block vector.
 
 EpetraVectorOrthogPoly (const EpetraVectorOrthogPoly &v)
 Copy constructor.
 
virtual ~EpetraVectorOrthogPoly ()
 Destructor.
 
EpetraVectorOrthogPolyoperator= (const EpetraVectorOrthogPoly &v)
 Assignment.
 
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)
 Reset to a new basis.
 
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)
 Reset to a new basis.
 
void computeMean (Epetra_Vector &v) const
 Compute mean.
 
void computeVariance (Epetra_Vector &v) const
 Compute variance.
 
void computeStandardDeviation (Epetra_Vector &v) const
 Compute standard deviation.
 
- Public Member Functions inherited from Stokhos::VectorOrthogPoly< Epetra_Vector >
 VectorOrthogPoly ()
 Constructor with no basis.
 
 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.
 
virtual ~VectorOrthogPoly ()
 Destructor.
 
VectorOrthogPolyoperator= (const VectorOrthogPoly &)
 Assignment.
 
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.
 
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis () const
 Get basis.
 
Epetra_Vectorterm (ordinal_type dimension, ordinal_type order)
 Get term for dimension dimension and order order.
 
const Epetra_Vectorterm (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_Vector &result) const
 Evaluate polynomial at supplied basis values.
 
void sumIntoAllTerms (const value_type &weight, const Teuchos::Array< value_type > &basis_values, const Teuchos::Array< value_type > &basis_norms, const Epetra_Vector &vec)
 Evaluate polynomial at supplied basis values.
 
std::ostream & print (std::ostream &os) const
 Print polynomial.
 
- Public Member Functions inherited from Stokhos::ProductContainer< coeff_type >
 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_BlockMapmap () 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.
 
- Public Member Functions inherited from Stokhos::ProductEpetraVector
 ProductEpetraVector ()
 Default constructor.
 
 ProductEpetraVector (const Teuchos::RCP< const Epetra_BlockMap > &block_map)
 Create a container with container map block_map.
 
 ProductEpetraVector (const Teuchos::RCP< const Epetra_BlockMap > &block_map, const Teuchos::RCP< const Epetra_BlockMap > &coeff_map, const Teuchos::RCP< const EpetraExt::MultiComm > &product_comm)
 Create a container with container map block_map where each coefficient is generated from the supplied coefficient map coeff_map.
 
 ProductEpetraVector (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)
 Create a container with container map block_map where each coefficient is generated from the supplied coefficient map coeff_map.
 
 ProductEpetraVector (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_Vector &block_vector)
 Create a container with container map block_map where each coefficient is given by the supplied block vector.
 
 ProductEpetraVector (const ProductEpetraVector &v)
 Copy constructor.
 
virtual ~ProductEpetraVector ()
 Destructor.
 
ProductEpetraVectoroperator= (const ProductEpetraVector &v)
 Assignment.
 
ProductEpetraVectoroperator= (const Epetra_Vector &v)
 Assignment.
 
void assignToBlockVector (Epetra_Vector &v) const
 Assignment.
 
void assignFromBlockVector (const Epetra_Vector &v)
 Assignment.
 
Teuchos::RCP< const Epetra_BlockMapcoefficientMap () const
 Get coefficient map.
 
Teuchos::RCP< const Epetra_BlockMapproductMap () const
 Get product map.
 
Teuchos::RCP< const EpetraExt::MultiComm > productComm () const
 Get product comm.
 
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)
 Reset to a new size.
 
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)
 Reset to a new size.
 
void resetCoefficients (Epetra_DataAccess CV, const Epetra_Vector &block_vector)
 Reset vector cofficients.
 
Teuchos::RCP< EpetraExt::BlockVector > getBlockVector ()
 Get block vector.
 
Teuchos::RCP< const EpetraExt::BlockVector > getBlockVector () const
 Get block vector.
 
void setBlockVector (const Teuchos::RCP< EpetraExt::BlockVector > &block_vec)
 Set block vector.
 
void sumAll ()
 Sum coefficients across processors, storing result in this.
 
- Public Member Functions inherited from Stokhos::ProductContainer< Epetra_Vector >
 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_BlockMapmap () const
 Return container map.
 
const Teuchos::Array< Teuchos::RCP< Epetra_Vector > > & getCoefficients () const
 Return array of coefficients.
 
Teuchos::Array< Teuchos::RCP< Epetra_Vector > > & getCoefficients ()
 Return array of coefficients.
 
Teuchos::RCP< Epetra_VectorgetCoeffPtr (ordinal_type i)
 Return ref-count pointer to coefficient i.
 
Teuchos::RCP< const Epetra_VectorgetCoeffPtr (ordinal_type i) const
 Return ref-count pointer to constant coefficient i.
 
void setCoeffPtr (ordinal_type i, const Teuchos::RCP< Epetra_Vector > &c)
 Set coefficient i to c.
 
Epetra_Vectoroperator[] (ordinal_type i)
 Array access.
 
const Epetra_Vectoroperator[] (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.
 

Additional Inherited Members

- Protected Attributes inherited from Stokhos::VectorOrthogPoly< Epetra_Vector >
Teuchos::RCP< const Stokhos::OrthogPolyBasis< ordinal_type, value_type > > basis_
 Basis.
 
- Protected Attributes inherited from Stokhos::ProductContainer< coeff_type >
Teuchos::RCP< const Epetra_BlockMapmap_
 Container map.
 
Teuchos::Array< Teuchos::RCP< coeff_type > > coeff_
 Array of polynomial coefficients.
 
- Protected Attributes inherited from Stokhos::ProductEpetraVector
Teuchos::RCP< const Epetra_BlockMapcoeff_map
 Product map of block vector.
 
Teuchos::RCP< const EpetraExt::MultiComm > product_comm
 Product multi-level communicator.
 
Teuchos::RCP< const Epetra_BlockMapproduct_map
 Product map of block vector.
 
Teuchos::RCP< EpetraExt::BlockVector > bv
 Block vector storing coefficients.
 
- Protected Attributes inherited from Stokhos::ProductContainer< Epetra_Vector >
Teuchos::RCP< const Epetra_BlockMapmap_
 Container map.
 
Teuchos::Array< Teuchos::RCP< Epetra_Vector > > coeff_
 Array of polynomial coefficients.
 

Detailed Description

A container class storing an orthogonal polynomial whose coefficients are vectors, operators, or in general any type that would have an expensive copy constructor.

Definition at line 55 of file Stokhos_EpetraVectorOrthogPoly.hpp.

Member Typedef Documentation

◆ value_type

Typename of values.

Definition at line 61 of file Stokhos_EpetraVectorOrthogPoly.hpp.

◆ ordinal_type

Typename of ordinals.

Definition at line 64 of file Stokhos_EpetraVectorOrthogPoly.hpp.

Constructor & Destructor Documentation

◆ EpetraVectorOrthogPoly() [1/6]

Stokhos::EpetraVectorOrthogPoly::EpetraVectorOrthogPoly ( )

Constructor with no basis.

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

Definition at line 44 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ EpetraVectorOrthogPoly() [2/6]

Stokhos::EpetraVectorOrthogPoly::EpetraVectorOrthogPoly ( 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.

Definition at line 52 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ EpetraVectorOrthogPoly() [3/6]

Stokhos::EpetraVectorOrthogPoly::EpetraVectorOrthogPoly ( 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 )

Create a polynomial for basis basis where each coefficient is generated from the supplied map.

Definition at line 62 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ EpetraVectorOrthogPoly() [4/6]

Stokhos::EpetraVectorOrthogPoly::EpetraVectorOrthogPoly ( 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 )

Create a polynomial for basis basis where each coefficient is given by a created block vector.

Definition at line 74 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ EpetraVectorOrthogPoly() [5/6]

Stokhos::EpetraVectorOrthogPoly::EpetraVectorOrthogPoly ( 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_Vector & block_vector )

Create a polynomial for basis basis where each coefficient is given by the supplied block vector.

Definition at line 87 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ EpetraVectorOrthogPoly() [6/6]

Stokhos::EpetraVectorOrthogPoly::EpetraVectorOrthogPoly ( const EpetraVectorOrthogPoly & v)

Copy constructor.

NOTE: This is a shallow copy

Definition at line 103 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ ~EpetraVectorOrthogPoly()

Stokhos::EpetraVectorOrthogPoly::~EpetraVectorOrthogPoly ( )
virtual

Destructor.

Definition at line 111 of file Stokhos_EpetraVectorOrthogPoly.cpp.

Member Function Documentation

◆ operator=()

Stokhos::EpetraVectorOrthogPoly & Stokhos::EpetraVectorOrthogPoly::operator= ( const EpetraVectorOrthogPoly & v)

Assignment.

NOTE: This is a shallow copy

Definition at line 115 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ reset() [1/2]

void Stokhos::EpetraVectorOrthogPoly::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 )

Reset to a new basis.

This resizes array to fit new basis.

Definition at line 123 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ reset() [2/2]

void Stokhos::EpetraVectorOrthogPoly::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 )

Reset to a new basis.

This resizes array to fit new basis.

Definition at line 135 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ computeMean()

void Stokhos::EpetraVectorOrthogPoly::computeMean ( Epetra_Vector & v) const

Compute mean.

Definition at line 148 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ computeVariance()

void Stokhos::EpetraVectorOrthogPoly::computeVariance ( Epetra_Vector & v) const

Compute variance.

Definition at line 167 of file Stokhos_EpetraVectorOrthogPoly.cpp.

◆ computeStandardDeviation()

void Stokhos::EpetraVectorOrthogPoly::computeStandardDeviation ( Epetra_Vector & v) const

Compute standard deviation.

Definition at line 195 of file Stokhos_EpetraVectorOrthogPoly.cpp.


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