Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
|
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_VectorOrthogPoly.hpp>
Public Types | |
typedef ProductContainer < coeff_type >::traits_type | traits_type |
Typename of traits. More... | |
typedef ProductContainer < coeff_type >::value_type | value_type |
Typename of values. More... | |
typedef ProductContainer < coeff_type >::ordinal_type | ordinal_type |
Typename of ordinals. More... | |
Public Types inherited from Stokhos::ProductContainer< coeff_type > | |
typedef Stokhos::ProductContainerTraits < coeff_type > | traits_type |
Typename of traits. More... | |
typedef traits_type::value_type | value_type |
Typename of values. More... | |
typedef traits_type::ordinal_type | ordinal_type |
Typename of ordinals. More... | |
Public Member Functions | |
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. More... | |
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. More... | |
VectorOrthogPoly (const VectorOrthogPoly &) | |
Copy constructor. More... | |
virtual | ~VectorOrthogPoly () |
Destructor. More... | |
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. More... | |
coeff_type & | term (ordinal_type dimension, ordinal_type order) |
Get term for dimension dimension and order order . More... | |
const coeff_type & | term (ordinal_type dimension, ordinal_type order) const |
Get term for dimension dimension and order order . More... | |
void | evaluate (const Teuchos::Array< value_type > &basis_values, coeff_type &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 coeff_type &vec) |
Evaluate polynomial at supplied basis values. More... | |
std::ostream & | print (std::ostream &os) const |
Print polynomial. More... | |
Public Member Functions inherited from Stokhos::ProductContainer< coeff_type > | |
ProductContainer () | |
Default constructor. More... | |
ProductContainer (const Teuchos::RCP< const Epetra_BlockMap > &map) | |
Create a container with container map map . More... | |
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. More... | |
ProductContainer (const ProductContainer &) | |
Copy constructor. More... | |
virtual | ~ProductContainer () |
Destructor. More... | |
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. More... | |
Teuchos::RCP< const Epetra_BlockMap > | map () const |
Return container map. More... | |
const Teuchos::Array < Teuchos::RCP< coeff_type > > & | getCoefficients () const |
Return array of coefficients. More... | |
Teuchos::Array< Teuchos::RCP < coeff_type > > & | getCoefficients () |
Return array of coefficients. More... | |
Teuchos::RCP< coeff_type > | getCoeffPtr (ordinal_type i) |
Return ref-count pointer to coefficient i . More... | |
Teuchos::RCP< const coeff_type > | getCoeffPtr (ordinal_type i) const |
Return ref-count pointer to constant coefficient i . More... | |
void | setCoeffPtr (ordinal_type i, const Teuchos::RCP< coeff_type > &c) |
Set coefficient i to c . More... | |
coeff_type & | operator[] (ordinal_type i) |
Array access. More... | |
const coeff_type & | operator[] (ordinal_type i) const |
Array access. More... | |
void | init (const value_type &val) |
Initialize coefficients. More... | |
bool | myGID (int i) const |
Return whether global index i resides on this processor. More... | |
std::ostream & | print (std::ostream &os) const |
Print polynomial. More... | |
Protected Attributes | |
Teuchos::RCP< const Stokhos::OrthogPolyBasis < ordinal_type, value_type > > | basis_ |
Basis. More... | |
Protected Attributes inherited from Stokhos::ProductContainer< coeff_type > | |
Teuchos::RCP< const Epetra_BlockMap > | map_ |
Container map. More... | |
Teuchos::Array< Teuchos::RCP < coeff_type > > | coeff_ |
Array of polynomial coefficients. More... | |
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 24 of file Stokhos_VectorOrthogPoly.hpp.
typedef ProductContainer<coeff_type>::traits_type Stokhos::VectorOrthogPoly< coeff_type >::traits_type |
Typename of traits.
Definition at line 28 of file Stokhos_VectorOrthogPoly.hpp.
typedef ProductContainer<coeff_type>::value_type Stokhos::VectorOrthogPoly< coeff_type >::value_type |
Typename of values.
Definition at line 31 of file Stokhos_VectorOrthogPoly.hpp.
typedef ProductContainer<coeff_type>::ordinal_type Stokhos::VectorOrthogPoly< coeff_type >::ordinal_type |
Typename of ordinals.
Definition at line 34 of file Stokhos_VectorOrthogPoly.hpp.
Stokhos::VectorOrthogPoly< coeff_type >::VectorOrthogPoly | ( | ) |
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 14 of file Stokhos_VectorOrthogPolyImp.hpp.
Stokhos::VectorOrthogPoly< coeff_type >::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.
Definition at line 22 of file Stokhos_VectorOrthogPolyImp.hpp.
Stokhos::VectorOrthogPoly< coeff_type >::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.
Definition at line 32 of file Stokhos_VectorOrthogPolyImp.hpp.
Stokhos::VectorOrthogPoly< coeff_type >::VectorOrthogPoly | ( | const VectorOrthogPoly< coeff_type > & | v | ) |
Copy constructor.
NOTE: This is a shallow copy
Definition at line 43 of file Stokhos_VectorOrthogPolyImp.hpp.
|
virtual |
Destructor.
Definition at line 51 of file Stokhos_VectorOrthogPolyImp.hpp.
Stokhos::VectorOrthogPoly< coeff_type > & Stokhos::VectorOrthogPoly< coeff_type >::operator= | ( | const VectorOrthogPoly< coeff_type > & | v | ) |
Assignment.
NOTE: This is a shallow copy
Definition at line 58 of file Stokhos_VectorOrthogPolyImp.hpp.
void Stokhos::VectorOrthogPoly< coeff_type >::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.
This resizes array to fit new basis.
Definition at line 70 of file Stokhos_VectorOrthogPolyImp.hpp.
Teuchos::RCP< const Stokhos::OrthogPolyBasis< typename Stokhos::VectorOrthogPoly< coeff_type >::ordinal_type, typename Stokhos::VectorOrthogPoly< coeff_type >::value_type > > Stokhos::VectorOrthogPoly< coeff_type >::basis | ( | ) | const |
Get basis.
Definition at line 82 of file Stokhos_VectorOrthogPolyImp.hpp.
coeff_type & Stokhos::VectorOrthogPoly< coeff_type >::term | ( | ordinal_type | dimension, |
ordinal_type | order | ||
) |
Get term for dimension dimension
and order order
.
Definition at line 91 of file Stokhos_VectorOrthogPolyImp.hpp.
const coeff_type & Stokhos::VectorOrthogPoly< coeff_type >::term | ( | ordinal_type | dimension, |
ordinal_type | order | ||
) | const |
Get term for dimension dimension
and order order
.
Definition at line 105 of file Stokhos_VectorOrthogPolyImp.hpp.
void Stokhos::VectorOrthogPoly< coeff_type >::evaluate | ( | const Teuchos::Array< value_type > & | basis_values, |
coeff_type & | result | ||
) | const |
Evaluate polynomial at supplied basis values.
Currently doesn't work with parallel map.
Definition at line 119 of file Stokhos_VectorOrthogPolyImp.hpp.
void Stokhos::VectorOrthogPoly< coeff_type >::sumIntoAllTerms | ( | const value_type & | weight, |
const Teuchos::Array< value_type > & | basis_values, | ||
const Teuchos::Array< value_type > & | basis_norms, | ||
const coeff_type & | vec | ||
) |
Evaluate polynomial at supplied basis values.
Definition at line 130 of file Stokhos_VectorOrthogPolyImp.hpp.
std::ostream & Stokhos::VectorOrthogPoly< coeff_type >::print | ( | std::ostream & | os | ) | const |
Print polynomial.
Definition at line 148 of file Stokhos_VectorOrthogPolyImp.hpp.
|
protected |
Definition at line 114 of file Stokhos_VectorOrthogPoly.hpp.