Stokhos Package Browser (Single Doxygen Collection) Version of the Day
|
A container class for products of Epetra_Vector's.
More...
#include <Stokhos_ProductEpetraVector.hpp>
Public Types | |
typedef double | value_type |
Typename of values. | |
typedef int | ordinal_type |
Typename of ordinals. | |
![]() | |
typedef Stokhos::ProductContainerTraits< Epetra_Vector > | 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 | |
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. | |
ProductEpetraVector & | operator= (const ProductEpetraVector &v) |
Assignment. | |
ProductEpetraVector & | operator= (const Epetra_Vector &v) |
Assignment. | |
void | assignToBlockVector (Epetra_Vector &v) const |
Assignment. | |
void | assignFromBlockVector (const Epetra_Vector &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. | |
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. | |
![]() | |
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. | |
ProductContainer & | operator= (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< Epetra_Vector > > & | getCoefficients () const |
Return array of coefficients. | |
Teuchos::Array< Teuchos::RCP< Epetra_Vector > > & | getCoefficients () |
Return array of coefficients. | |
Teuchos::RCP< Epetra_Vector > | getCoeffPtr (ordinal_type i) |
Return ref-count pointer to coefficient i . | |
Teuchos::RCP< const Epetra_Vector > | getCoeffPtr (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_Vector & | operator[] (ordinal_type i) |
Array access. | |
const Epetra_Vector & | 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 > | 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::BlockVector > | bv |
Block vector storing coefficients. | |
![]() | |
Teuchos::RCP< const Epetra_BlockMap > | map_ |
Container map. | |
Teuchos::Array< Teuchos::RCP< Epetra_Vector > > | coeff_ |
Array of polynomial coefficients. | |
A container class for products of Epetra_Vector's.
Definition at line 56 of file Stokhos_ProductEpetraVector.hpp.
Typename of values.
Definition at line 61 of file Stokhos_ProductEpetraVector.hpp.
typedef int Stokhos::ProductEpetraVector::ordinal_type |
Typename of ordinals.
Definition at line 64 of file Stokhos_ProductEpetraVector.hpp.
Stokhos::ProductEpetraVector::ProductEpetraVector | ( | ) |
Default constructor.
Use with care! Generally you will want to call reset() before using any of the methods on this class.
Definition at line 46 of file Stokhos_ProductEpetraVector.cpp.
Stokhos::ProductEpetraVector::ProductEpetraVector | ( | const Teuchos::RCP< const Epetra_BlockMap > & | block_map | ) |
Create a container with container map block_map
.
Definition at line 52 of file Stokhos_ProductEpetraVector.cpp.
Stokhos::ProductEpetraVector::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
.
Definition at line 58 of file Stokhos_ProductEpetraVector.cpp.
Stokhos::ProductEpetraVector::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
.
Definition at line 73 of file Stokhos_ProductEpetraVector.cpp.
Stokhos::ProductEpetraVector::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.
Definition at line 89 of file Stokhos_ProductEpetraVector.cpp.
Stokhos::ProductEpetraVector::ProductEpetraVector | ( | const ProductEpetraVector & | v | ) |
Copy constructor.
NOTE: This is a shallow copy
Definition at line 107 of file Stokhos_ProductEpetraVector.cpp.
|
virtual |
Destructor.
Definition at line 117 of file Stokhos_ProductEpetraVector.cpp.
Stokhos::ProductEpetraVector & Stokhos::ProductEpetraVector::operator= | ( | const ProductEpetraVector & | v | ) |
Assignment.
NOTE: This is a shallow copy
Definition at line 121 of file Stokhos_ProductEpetraVector.cpp.
Stokhos::ProductEpetraVector & Stokhos::ProductEpetraVector::operator= | ( | const Epetra_Vector & | v | ) |
Assignment.
Definition at line 132 of file Stokhos_ProductEpetraVector.cpp.
void Stokhos::ProductEpetraVector::assignToBlockVector | ( | Epetra_Vector & | v | ) | const |
Assignment.
Definition at line 147 of file Stokhos_ProductEpetraVector.cpp.
void Stokhos::ProductEpetraVector::assignFromBlockVector | ( | const Epetra_Vector & | v | ) |
Assignment.
Definition at line 162 of file Stokhos_ProductEpetraVector.cpp.
Teuchos::RCP< const Epetra_BlockMap > Stokhos::ProductEpetraVector::coefficientMap | ( | ) | const |
Get coefficient map.
Definition at line 177 of file Stokhos_ProductEpetraVector.cpp.
Teuchos::RCP< const Epetra_BlockMap > Stokhos::ProductEpetraVector::productMap | ( | ) | const |
Get product map.
Definition at line 183 of file Stokhos_ProductEpetraVector.cpp.
Teuchos::RCP< const EpetraExt::MultiComm > Stokhos::ProductEpetraVector::productComm | ( | ) | const |
Get product comm.
Definition at line 189 of file Stokhos_ProductEpetraVector.cpp.
void Stokhos::ProductEpetraVector::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.
This resizes array to fit new size.
Definition at line 195 of file Stokhos_ProductEpetraVector.cpp.
void Stokhos::ProductEpetraVector::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.
This resizes array to fit new size.
Definition at line 213 of file Stokhos_ProductEpetraVector.cpp.
void Stokhos::ProductEpetraVector::resetCoefficients | ( | Epetra_DataAccess | CV, |
const Epetra_Vector & | block_vector ) |
Reset vector cofficients.
Definition at line 229 of file Stokhos_ProductEpetraVector.cpp.
Teuchos::RCP< EpetraExt::BlockVector > Stokhos::ProductEpetraVector::getBlockVector | ( | ) |
Get block vector.
Definition at line 239 of file Stokhos_ProductEpetraVector.cpp.
Teuchos::RCP< const EpetraExt::BlockVector > Stokhos::ProductEpetraVector::getBlockVector | ( | ) | const |
Get block vector.
Definition at line 246 of file Stokhos_ProductEpetraVector.cpp.
void Stokhos::ProductEpetraVector::setBlockVector | ( | const Teuchos::RCP< EpetraExt::BlockVector > & | block_vec | ) |
Set block vector.
Definition at line 253 of file Stokhos_ProductEpetraVector.cpp.
void Stokhos::ProductEpetraVector::sumAll | ( | ) |
Sum coefficients across processors, storing result in this.
This is only appropriate for local-replicated parallel maps
Definition at line 262 of file Stokhos_ProductEpetraVector.cpp.
|
protected |
Product map of block vector.
Definition at line 186 of file Stokhos_ProductEpetraVector.hpp.
|
protected |
Product multi-level communicator.
Definition at line 189 of file Stokhos_ProductEpetraVector.hpp.
|
protected |
Product map of block vector.
Definition at line 192 of file Stokhos_ProductEpetraVector.hpp.
|
protected |
Block vector storing coefficients.
Definition at line 195 of file Stokhos_ProductEpetraVector.hpp.