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

A container class storing products of Epetra_MultiVector's.
More...

#include <Stokhos_ProductEpetraMultiVector.hpp>

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

Public Types

typedef double value_type
 Typename of values.
 
typedef int ordinal_type
 Typename of ordinals.
 
- Public Types inherited from Stokhos::ProductContainer< Epetra_MultiVector >
typedef Stokhos::ProductContainerTraits< Epetra_MultiVectortraits_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

 ProductEpetraMultiVector ()
 Default constructor.
 
 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.
 
virtual ~ProductEpetraMultiVector ()
 Destructor.
 
ProductEpetraMultiVectoroperator= (const ProductEpetraMultiVector &v)
 Assignment.
 
ProductEpetraMultiVectoroperator= (const Epetra_MultiVector &v)
 Assignment.
 
void assignToBlockMultiVector (Epetra_MultiVector &v) const
 Assignment.
 
void assignFromBlockMultiVector (const Epetra_MultiVector &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.
 
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.
 
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.
 
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.
 
- Public Member Functions inherited from Stokhos::ProductContainer< Epetra_MultiVector >
 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_MultiVector > > & getCoefficients () const
 Return array of coefficients.
 
Teuchos::Array< Teuchos::RCP< Epetra_MultiVector > > & getCoefficients ()
 Return array of coefficients.
 
Teuchos::RCP< Epetra_MultiVectorgetCoeffPtr (ordinal_type i)
 Return ref-count pointer to coefficient i.
 
Teuchos::RCP< const Epetra_MultiVectorgetCoeffPtr (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_MultiVectoroperator[] (ordinal_type i)
 Array access.
 
const Epetra_MultiVectoroperator[] (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_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::BlockMultiVector > bv
 Block vector storing coefficients.
 
- Protected Attributes inherited from Stokhos::ProductContainer< Epetra_MultiVector >
Teuchos::RCP< const Epetra_BlockMapmap_
 Container map.
 
Teuchos::Array< Teuchos::RCP< Epetra_MultiVector > > coeff_
 Array of polynomial coefficients.
 

Detailed Description

A container class storing products of Epetra_MultiVector's.

Definition at line 56 of file Stokhos_ProductEpetraMultiVector.hpp.

Member Typedef Documentation

◆ value_type

Typename of values.

Definition at line 61 of file Stokhos_ProductEpetraMultiVector.hpp.

◆ ordinal_type

Typename of ordinals.

Definition at line 64 of file Stokhos_ProductEpetraMultiVector.hpp.

Constructor & Destructor Documentation

◆ ProductEpetraMultiVector() [1/6]

Stokhos::ProductEpetraMultiVector::ProductEpetraMultiVector ( )

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_ProductEpetraMultiVector.cpp.

◆ ProductEpetraMultiVector() [2/6]

Stokhos::ProductEpetraMultiVector::ProductEpetraMultiVector ( const Teuchos::RCP< const Epetra_BlockMap > & block_map)

Create a container with container map block_map.

Definition at line 52 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ ProductEpetraMultiVector() [3/6]

Stokhos::ProductEpetraMultiVector::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.

Definition at line 58 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ ProductEpetraMultiVector() [4/6]

Stokhos::ProductEpetraMultiVector::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.

Definition at line 75 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ ProductEpetraMultiVector() [5/6]

Stokhos::ProductEpetraMultiVector::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.

Definition at line 93 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ ProductEpetraMultiVector() [6/6]

Stokhos::ProductEpetraMultiVector::ProductEpetraMultiVector ( const ProductEpetraMultiVector & v)

Copy constructor.

NOTE: This is a shallow copy

Definition at line 112 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ ~ProductEpetraMultiVector()

Stokhos::ProductEpetraMultiVector::~ProductEpetraMultiVector ( )
virtual

Destructor.

Definition at line 122 of file Stokhos_ProductEpetraMultiVector.cpp.

Member Function Documentation

◆ operator=() [1/2]

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

Assignment.

NOTE: This is a shallow copy

Definition at line 126 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ operator=() [2/2]

Stokhos::ProductEpetraMultiVector & Stokhos::ProductEpetraMultiVector::operator= ( const Epetra_MultiVector & v)

Assignment.

Definition at line 137 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ assignToBlockMultiVector()

void Stokhos::ProductEpetraMultiVector::assignToBlockMultiVector ( Epetra_MultiVector & v) const

Assignment.

Definition at line 152 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ assignFromBlockMultiVector()

void Stokhos::ProductEpetraMultiVector::assignFromBlockMultiVector ( const Epetra_MultiVector & v)

Assignment.

Definition at line 167 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ coefficientMap()

Teuchos::RCP< const Epetra_BlockMap > Stokhos::ProductEpetraMultiVector::coefficientMap ( ) const

Get coefficient map.

Definition at line 182 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ productMap()

Teuchos::RCP< const Epetra_BlockMap > Stokhos::ProductEpetraMultiVector::productMap ( ) const

Get product map.

Definition at line 188 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ productComm()

Teuchos::RCP< const EpetraExt::MultiComm > Stokhos::ProductEpetraMultiVector::productComm ( ) const

Get product comm.

Definition at line 194 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ numVectors()

int Stokhos::ProductEpetraMultiVector::numVectors ( ) const

Get number of vectors.

Definition at line 200 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ reset() [1/2]

void Stokhos::ProductEpetraMultiVector::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.

This resizes array to fit new size.

Definition at line 210 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ reset() [2/2]

void Stokhos::ProductEpetraMultiVector::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.

This resizes array to fit new size.

Definition at line 230 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ resetCoefficients()

void Stokhos::ProductEpetraMultiVector::resetCoefficients ( Epetra_DataAccess CV,
const Epetra_MultiVector & block_vector )

Reset vector cofficients.

Definition at line 248 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ getBlockMultiVector() [1/2]

Teuchos::RCP< EpetraExt::BlockMultiVector > Stokhos::ProductEpetraMultiVector::getBlockMultiVector ( )

Get block vector.

Definition at line 259 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ getBlockMultiVector() [2/2]

Teuchos::RCP< const EpetraExt::BlockMultiVector > Stokhos::ProductEpetraMultiVector::getBlockMultiVector ( ) const

Get block vector.

Definition at line 266 of file Stokhos_ProductEpetraMultiVector.cpp.

◆ setBlockMultiVector()

void Stokhos::ProductEpetraMultiVector::setBlockMultiVector ( const Teuchos::RCP< EpetraExt::BlockMultiVector > & block_vec)

Set block vector.

Definition at line 273 of file Stokhos_ProductEpetraMultiVector.cpp.

Member Data Documentation

◆ coeff_map

Teuchos::RCP<const Epetra_BlockMap> Stokhos::ProductEpetraMultiVector::coeff_map
protected

Product map of block vector.

Definition at line 190 of file Stokhos_ProductEpetraMultiVector.hpp.

◆ product_comm

Teuchos::RCP<const EpetraExt::MultiComm> Stokhos::ProductEpetraMultiVector::product_comm
protected

Product multi-level communicator.

Definition at line 193 of file Stokhos_ProductEpetraMultiVector.hpp.

◆ product_map

Teuchos::RCP<const Epetra_BlockMap> Stokhos::ProductEpetraMultiVector::product_map
protected

Product map of block vector.

Definition at line 196 of file Stokhos_ProductEpetraMultiVector.hpp.

◆ bv

Teuchos::RCP<EpetraExt::BlockMultiVector> Stokhos::ProductEpetraMultiVector::bv
protected

Block vector storing coefficients.

Definition at line 199 of file Stokhos_ProductEpetraMultiVector.hpp.


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