Stokhos Package Browser (Single Doxygen Collection)
Version of the Day
|
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>
Public Types | |
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 | |
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 Epetra_BlockMap > | map_ |
Container map. More... | |
Teuchos::Array< Teuchos::RCP < coeff_type > > | coeff_ |
Array of polynomial coefficients. More... | |
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.
Definition at line 61 of file Stokhos_ProductContainer.hpp.
typedef Stokhos::ProductContainerTraits<coeff_type> Stokhos::ProductContainer< coeff_type >::traits_type |
Typename of traits.
Definition at line 65 of file Stokhos_ProductContainer.hpp.
typedef traits_type::value_type Stokhos::ProductContainer< coeff_type >::value_type |
Typename of values.
Definition at line 68 of file Stokhos_ProductContainer.hpp.
typedef traits_type::ordinal_type Stokhos::ProductContainer< coeff_type >::ordinal_type |
Typename of ordinals.
Definition at line 71 of file Stokhos_ProductContainer.hpp.
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.
Definition at line 44 of file Stokhos_ProductContainerImp.hpp.
Stokhos::ProductContainer< coeff_type >::ProductContainer | ( | const Teuchos::RCP< const Epetra_BlockMap > & | map | ) |
Create a container with container map map
.
Definition at line 52 of file Stokhos_ProductContainerImp.hpp.
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.
Definition at line 60 of file Stokhos_ProductContainerImp.hpp.
Stokhos::ProductContainer< coeff_type >::ProductContainer | ( | const ProductContainer< coeff_type > & | v | ) |
Copy constructor.
NOTE: This is a shallow copy
Definition at line 72 of file Stokhos_ProductContainerImp.hpp.
|
virtual |
Destructor.
Definition at line 80 of file Stokhos_ProductContainerImp.hpp.
Stokhos::ProductContainer< coeff_type > & Stokhos::ProductContainer< coeff_type >::operator= | ( | const ProductContainer< coeff_type > & | v | ) |
Assignment.
NOTE: This is a shallow copy
Definition at line 87 of file Stokhos_ProductContainerImp.hpp.
void Stokhos::ProductContainer< coeff_type >::reset | ( | const Teuchos::RCP< const Epetra_BlockMap > & | map | ) |
Resize to new map map
.
Any previous coefficients are lost.
Definition at line 99 of file Stokhos_ProductContainerImp.hpp.
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.
Definition at line 109 of file Stokhos_ProductContainerImp.hpp.
void Stokhos::ProductContainer< coeff_type >::resize | ( | const Teuchos::RCP< const Epetra_BlockMap > & | map | ) |
Resize to map map
.
Coefficients are preserved.
Definition at line 122 of file Stokhos_ProductContainerImp.hpp.
void Stokhos::ProductContainer< coeff_type >::reserve | ( | ordinal_type | sz | ) |
Reserve space for a size sz
container.
Coefficients are preserved.
Definition at line 131 of file Stokhos_ProductContainerImp.hpp.
Stokhos::ProductContainer< coeff_type >::ordinal_type Stokhos::ProductContainer< coeff_type >::size | ( | ) | const |
Return size.
Definition at line 139 of file Stokhos_ProductContainerImp.hpp.
Teuchos::RCP< const Epetra_BlockMap > Stokhos::ProductContainer< coeff_type >::map | ( | ) | const |
Return container map.
Definition at line 147 of file Stokhos_ProductContainerImp.hpp.
const Teuchos::Array< Teuchos::RCP< coeff_type > > & Stokhos::ProductContainer< coeff_type >::getCoefficients | ( | ) | const |
Return array of coefficients.
Definition at line 155 of file Stokhos_ProductContainerImp.hpp.
Teuchos::Array< Teuchos::RCP< coeff_type > > & Stokhos::ProductContainer< coeff_type >::getCoefficients | ( | ) |
Return array of coefficients.
Definition at line 163 of file Stokhos_ProductContainerImp.hpp.
Teuchos::RCP< coeff_type > Stokhos::ProductContainer< coeff_type >::getCoeffPtr | ( | ordinal_type | i | ) |
Return ref-count pointer to coefficient i
.
Definition at line 171 of file Stokhos_ProductContainerImp.hpp.
Teuchos::RCP< const coeff_type > Stokhos::ProductContainer< coeff_type >::getCoeffPtr | ( | ordinal_type | i | ) | const |
Return ref-count pointer to constant coefficient i
.
Definition at line 179 of file Stokhos_ProductContainerImp.hpp.
void Stokhos::ProductContainer< coeff_type >::setCoeffPtr | ( | ordinal_type | i, |
const Teuchos::RCP< coeff_type > & | c | ||
) |
Set coefficient i
to c
.
Definition at line 187 of file Stokhos_ProductContainerImp.hpp.
coeff_type & Stokhos::ProductContainer< coeff_type >::operator[] | ( | ordinal_type | i | ) |
Array access.
Definition at line 195 of file Stokhos_ProductContainerImp.hpp.
const coeff_type & Stokhos::ProductContainer< coeff_type >::operator[] | ( | ordinal_type | i | ) | const |
Array access.
Definition at line 203 of file Stokhos_ProductContainerImp.hpp.
void Stokhos::ProductContainer< coeff_type >::init | ( | const value_type & | val | ) |
Initialize coefficients.
Definition at line 219 of file Stokhos_ProductContainerImp.hpp.
bool Stokhos::ProductContainer< coeff_type >::myGID | ( | int | i | ) | const |
Return whether global index i resides on this processor.
Definition at line 211 of file Stokhos_ProductContainerImp.hpp.
std::ostream & Stokhos::ProductContainer< coeff_type >::print | ( | std::ostream & | os | ) | const |
Print polynomial.
Definition at line 229 of file Stokhos_ProductContainerImp.hpp.
|
protected |
Container map.
Definition at line 176 of file Stokhos_ProductContainer.hpp.
|
protected |
Array of polynomial coefficients.
Definition at line 179 of file Stokhos_ProductContainer.hpp.