Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
panzer::EpetraVector_ReadOnly_GlobalEvaluationData Class Reference

This class provides a boundary exchange communication mechanism for vectors. More...

#include <Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp>

Inheritance diagram for panzer::EpetraVector_ReadOnly_GlobalEvaluationData:
Inheritance graph
[legend]

Public Member Functions

 EpetraVector_ReadOnly_GlobalEvaluationData ()
 Default Constructor. More...
 
 EpetraVector_ReadOnly_GlobalEvaluationData (const EpetraVector_ReadOnly_GlobalEvaluationData &src)
 Copy Constructor. More...
 
 EpetraVector_ReadOnly_GlobalEvaluationData (const Teuchos::RCP< const Epetra_Import > &importer, const Teuchos::RCP< const Epetra_Map > &ghostedMap, const Teuchos::RCP< const Epetra_Map > &ownedMap)
 Initializing Constructor. More...
 
void useConstantValues (const std::vector< int > &indices, double value)
 Choose a few GIDs and, instead of zeroing them out in the ghosted vector, set them to a specified value. More...
 
void initialize (const Teuchos::RCP< const Epetra_Import > &importer, const Teuchos::RCP< const Epetra_Map > &ghostedMap, const Teuchos::RCP< const Epetra_Map > &ownedMap)
 Initialize this object with some Epetra communication objects. More...
 
virtual void globalToGhost (int mem=0)
 Communicate the owned data to the ghosted vector. More...
 
virtual void initializeData ()
 Clear out the ghosted vector. More...
 
virtual void ghostToGlobal (int mem=0)
 Communicate the ghosted data to the owned vector. More...
 
virtual bool requiresDirichletAdjustment () const
 Determine if a Dirichlet adjustment is necessary. More...
 
void setOwnedVector_Epetra (const Teuchos::RCP< const Epetra_Vector > &ownedVector)
 Set the owned vector (Epetra version). More...
 
Teuchos::RCP< Epetra_VectorgetGhostedVector_Epetra () const
 Get the ghosted vector (Epetra version). More...
 
void setOwnedVector (const Teuchos::RCP< const Thyra::VectorBase< double >> &ownedVector)
 Set the owned vector (Thyra version). More...
 
Teuchos::RCP< const
Thyra::VectorBase< double > > 
getOwnedVector () const
 Get the owned vector (Thyra version). More...
 
Teuchos::RCP
< Thyra::VectorBase< double > > 
getGhostedVector () const
 Get the ghosted vector (Thyra version). More...
 
bool isInitialized () const
 Is this object initialized? More...
 
void print (std::ostream &os) const
 Print the object. More...
 
- Public Member Functions inherited from panzer::ReadOnlyVector_GlobalEvaluationData
virtual ~ReadOnlyVector_GlobalEvaluationData ()
 Virtual d. More...
 
virtual void setOwnedVector (const Teuchos::RCP< const Thyra::VectorBase< double > > &ownedVector)=0
 Set the owned vector. More...
 
const double & operator[] (const int &lid) const
 Element access. More...
 
- Public Member Functions inherited from panzer::GlobalEvaluationData
virtual ~GlobalEvaluationData ()=0
 

Private Types

typedef std::pair< std::vector
< int >, double > 
FilteredPair
 A list of global IDs (which will be translated to local IDs), paired with a value to be assigned in the ghostedVector_. More...
 

Private Attributes

bool isInitialized_
 A flag indicating whether or not the object has been initialized. More...
 
Teuchos::RCP< const Epetra_MapghostedMap_
 The map corresponding to the ghosted vector. More...
 
Teuchos::RCP< const Epetra_MapownedMap_
 The map corresponding to the owned vector. More...
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< double > > 
ghostedSpace_
 The vector space corresponding to the ghosted vector. More...
 
Teuchos::RCP< const
Thyra::VectorSpaceBase< double > > 
ownedSpace_
 The vector space corresponding to the owned vector. More...
 
Teuchos::RCP< const Epetra_Importimporter_
 The importer used to communicate between the owned and ghosted vectors. More...
 
Teuchos::RCP< Epetra_VectorghostedVector_
 The ghosted vector. More...
 
Teuchos::RCP< const
Thyra::VectorBase< double > > 
ownedVector_
 The owned vector. More...
 
std::vector< FilteredPairfilteredPairs_
 The list of filtered pairs, used to initialize values on the ghostedVector_. More...
 

Additional Inherited Members

- Protected Attributes inherited from panzer::ReadOnlyVector_GlobalEvaluationData
panzer::kokkos_utils::VectorToViewTraits
< const Epetra_Vector >::View 
ownedView_
 The Kokkos::View of the owned vector. More...
 
panzer::kokkos_utils::VectorToViewTraits
< Epetra_Vector >::View 
ghostedView_
 The Kokkos::View of the ghosted vector. More...
 

Detailed Description

This class provides a boundary exchange communication mechanism for vectors.

Note
This provides a read-only (RO) interface for parameters (so vectors are write protected).

Definition at line 78 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Member Typedef Documentation

typedef std::pair<std::vector<int>, double> panzer::EpetraVector_ReadOnly_GlobalEvaluationData::FilteredPair
private

A list of global IDs (which will be translated to local IDs), paired with a value to be assigned in the ghostedVector_.

Definition at line 320 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Constructor & Destructor Documentation

panzer::EpetraVector_ReadOnly_GlobalEvaluationData::EpetraVector_ReadOnly_GlobalEvaluationData ( )
inline

Default Constructor.

Definition at line 87 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

panzer::EpetraVector_ReadOnly_GlobalEvaluationData::EpetraVector_ReadOnly_GlobalEvaluationData ( const EpetraVector_ReadOnly_GlobalEvaluationData src)
inline

Copy Constructor.

Parameters
[in]srcThe object to be copied.

Definition at line 98 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

panzer::EpetraVector_ReadOnly_GlobalEvaluationData::EpetraVector_ReadOnly_GlobalEvaluationData ( const Teuchos::RCP< const Epetra_Import > &  importer,
const Teuchos::RCP< const Epetra_Map > &  ghostedMap,
const Teuchos::RCP< const Epetra_Map > &  ownedMap 
)
inline

Initializing Constructor.

Initialize this object with some Epetra communication objects. This method must be called before an object of this type can be used.

Parameters
[in]importerImporter for doing communication from the owned to the ghosted vector.
[in]ghostedMapMap describing the ghosted vector.
[in]ownedMapMap describing the owned vector.

Definition at line 117 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Member Function Documentation

void panzer::EpetraVector_ReadOnly_GlobalEvaluationData::useConstantValues ( const std::vector< int > &  indices,
double  value 
)

Choose a few GIDs and, instead of zeroing them out in the ghosted vector, set them to a specified value.

Note
This is only useful for GIDs in the ghosted map.
This must be called before initialize().
No attempt to synchronize these values across a processor is made, so it's up to the user to be consistent.
Parameters
[in]indicesA std::vector of global IDs.
[in]valueThe value to be assigned to the entries given by indices.

Definition at line 71 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

void panzer::EpetraVector_ReadOnly_GlobalEvaluationData::initialize ( const Teuchos::RCP< const Epetra_Import > &  importer,
const Teuchos::RCP< const Epetra_Map > &  ghostedMap,
const Teuchos::RCP< const Epetra_Map > &  ownedMap 
)

Initialize this object with some Epetra communication objects.

This method must be called before an object of this type can be used.

Parameters
[in]importerImporter for doing communication from the owned to the ghosted vector.
[in]ghostedMapMap describing the ghosted vector.
[in]ownedMapMap describing the owned vector.

Definition at line 94 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

void panzer::EpetraVector_ReadOnly_GlobalEvaluationData::globalToGhost ( int  mem = 0)
virtual

Communicate the owned data to the ghosted vector.

For this class, this method does the halo exchange for the vector.

Parameters
[in]memNot needed for this class, but part of the GlobalEvaluationData interface.

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 151 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

void panzer::EpetraVector_ReadOnly_GlobalEvaluationData::initializeData ( )
virtual

Clear out the ghosted vector.

Implements panzer::GlobalEvaluationData.

Definition at line 178 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

void panzer::EpetraVector_ReadOnly_GlobalEvaluationData::ghostToGlobal ( int  mem = 0)
virtual

Communicate the ghosted data to the owned vector.

For this class this method does nothing.

Parameters
[in]memNot needed for this class, but part of the GlobalEvaluationData interface.

Reimplemented from panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 204 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

virtual bool panzer::EpetraVector_ReadOnly_GlobalEvaluationData::requiresDirichletAdjustment ( ) const
inlinevirtual

Determine if a Dirichlet adjustment is necessary.

For this class, there's nothing to do because it's read-only.

Returns
False.

Implements panzer::GlobalEvaluationData.

Definition at line 200 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

void panzer::EpetraVector_ReadOnly_GlobalEvaluationData::setOwnedVector_Epetra ( const Teuchos::RCP< const Epetra_Vector > &  ownedVector)

Set the owned vector (Epetra version).

Parameters
[in]ownedVectorAn Epetra_Vector that you would like to set as the owned vector.

Definition at line 216 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

Teuchos::RCP< Epetra_Vector > panzer::EpetraVector_ReadOnly_GlobalEvaluationData::getGhostedVector_Epetra ( ) const

Get the ghosted vector (Epetra version).

Returns
The ghosted vector as an Epetra_Vector.

Definition at line 236 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

void panzer::EpetraVector_ReadOnly_GlobalEvaluationData::setOwnedVector ( const Teuchos::RCP< const Thyra::VectorBase< double >> &  ownedVector)

Set the owned vector (Thyra version).

Parameters
[in]ownedVectorA Thyra::VectorBase<double> that you would like to set as the owned vector.

Definition at line 255 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

Teuchos::RCP< const Thyra::VectorBase< double > > panzer::EpetraVector_ReadOnly_GlobalEvaluationData::getOwnedVector ( ) const
virtual

Get the owned vector (Thyra version).

Returns
The owned vector as a const Thyra::VectorBase<double>.

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 274 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

Teuchos::RCP< Thyra::VectorBase< double > > panzer::EpetraVector_ReadOnly_GlobalEvaluationData::getGhostedVector ( ) const
virtual

Get the ghosted vector (Thyra version).

Returns
The ghosted vector as a Thyra::VectorBase<double>.

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 290 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

bool panzer::EpetraVector_ReadOnly_GlobalEvaluationData::isInitialized ( ) const
inlinevirtual

Is this object initialized?

Returns
Whether or not the object is initialized.

Implements panzer::ReadOnlyVector_GlobalEvaluationData.

Definition at line 255 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

void panzer::EpetraVector_ReadOnly_GlobalEvaluationData::print ( std::ostream &  os) const
virtual

Print the object.

This is a diagnostic function for debugging purposes.

Parameters
[in,out]osThe output stream to which the data should be printed.

Reimplemented from panzer::GlobalEvaluationData.

Definition at line 310 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.cpp.

Member Data Documentation

bool panzer::EpetraVector_ReadOnly_GlobalEvaluationData::isInitialized_
private

A flag indicating whether or not the object has been initialized.

Definition at line 278 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Teuchos::RCP<const Epetra_Map> panzer::EpetraVector_ReadOnly_GlobalEvaluationData::ghostedMap_
private

The map corresponding to the ghosted vector.

Definition at line 283 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Teuchos::RCP<const Epetra_Map> panzer::EpetraVector_ReadOnly_GlobalEvaluationData::ownedMap_
private

The map corresponding to the owned vector.

Definition at line 288 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Teuchos::RCP<const Thyra::VectorSpaceBase<double> > panzer::EpetraVector_ReadOnly_GlobalEvaluationData::ghostedSpace_
private

The vector space corresponding to the ghosted vector.

Definition at line 293 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Teuchos::RCP<const Thyra::VectorSpaceBase<double> > panzer::EpetraVector_ReadOnly_GlobalEvaluationData::ownedSpace_
private

The vector space corresponding to the owned vector.

Definition at line 298 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Teuchos::RCP<const Epetra_Import> panzer::EpetraVector_ReadOnly_GlobalEvaluationData::importer_
private

The importer used to communicate between the owned and ghosted vectors.

Definition at line 304 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Teuchos::RCP<Epetra_Vector> panzer::EpetraVector_ReadOnly_GlobalEvaluationData::ghostedVector_
private

The ghosted vector.

Definition at line 309 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

Teuchos::RCP<const Thyra::VectorBase<double> > panzer::EpetraVector_ReadOnly_GlobalEvaluationData::ownedVector_
private

The owned vector.

Definition at line 314 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.

std::vector<FilteredPair> panzer::EpetraVector_ReadOnly_GlobalEvaluationData::filteredPairs_
private

The list of filtered pairs, used to initialize values on the ghostedVector_.

Definition at line 326 of file Panzer_EpetraVector_ReadOnly_GlobalEvaluationData.hpp.


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