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

This class encapsulates the needs of a gather operation to do a // halo exchange for blocked vectors. //. More...

#include <Panzer_BlockedVector_Write_GlobalEvaluationData.hpp>

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

Public Member Functions

 BlockedVector_Write_GlobalEvaluationData ()
 Default Constructor. More...
 
 BlockedVector_Write_GlobalEvaluationData (const BlockedVector_Write_GlobalEvaluationData &src)
 Copy Constructor. More...
 
 BlockedVector_Write_GlobalEvaluationData (const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> ghostedSpace, const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> ownedSpace, const std::vector< Teuchos::RCP< WriteVector_GlobalEvaluationData >> &gedBlocks)
 Initializing Constructor. More...
 
virtual ~BlockedVector_Write_GlobalEvaluationData ()
 Destructor. More...
 
void initialize (const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> &ghostedSpace, const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> &ownedSpace, const std::vector< Teuchos::RCP< WriteVector_GlobalEvaluationData >> &gedBlocks)
 Initialize this object using the sub-GlobalEvaluationData objects. More...
 
virtual bool isInitialized () const
 Is this object initialized? More...
 
virtual void ghostToGlobal (int mem)
 Communicate the ghosted data to the owned vector. More...
 
virtual void initializeData ()
 Initialize internal data for communication. More...
 
virtual void setOwnedVector (const Teuchos::RCP< Thyra::VectorBase< double >> &ownedVector)
 Set the owned vector. More...
 
virtual Teuchos::RCP
< Thyra::VectorBase< double > > 
getOwnedVector () const
 Get the owned vector. More...
 
virtual Teuchos::RCP
< Thyra::VectorBase< double > > 
getGhostedVector () const
 Get the ghosted vector. More...
 
size_t getBlockCount () const
 How many blocks do we have? More...
 
Teuchos::RCP
< WriteVector_GlobalEvaluationData
getGEDBlock (int i)
 Get the i-th block (non const version). More...
 
Teuchos::RCP< const
WriteVector_GlobalEvaluationData
getGEDBlock (int i) const
 Get the i-th block (const version). More...
 
bool requiresDirichletAdjustment () const
 Determine if a Dirichlet adjustment is necessary. More...
 
- Public Member Functions inherited from panzer::WriteVector_GlobalEvaluationData
 WriteVector_GlobalEvaluationData ()
 Default constructor, set combine mode to sum right away. More...
 
virtual ~WriteVector_GlobalEvaluationData ()
 Virtual d. More...
 
void setCombineMode (CombineMode cm)
 Allow the user to set the combine mode (at any time) More...
 
CombineMode getCombineMode () const
 Get the combine mode, to be used by sub classes. More...
 
virtual void globalToGhost (int)
 
virtual void setOwnedVector (const Teuchos::RCP< Thyra::VectorBase< double > > &ownedVector)=0
 Set the owned vector. More...
 
- Public Member Functions inherited from panzer::GlobalEvaluationData
virtual ~GlobalEvaluationData ()=0
 
virtual void print (std::ostream &os) const
 Diagnostic function for determinning what's in this object. More...
 

Private Attributes

bool isInitialized_
 A flag indicating whether or not the object has been initialized. More...
 
std::vector< Teuchos::RCP
< WriteVector_GlobalEvaluationData > > 
gedBlocks_
 A vector of the GlobalEvaluationData blocks. More...
 
Teuchos::RCP
< Thyra::VectorBase< double > > 
ownedVector_
 The owned vector. More...
 
Teuchos::RCP< const
Thyra::DefaultProductVectorSpace
< double > > 
ghostedSpace_
 The vector space corresponding to the ghosted vector. More...
 

Additional Inherited Members

- Public Types inherited from panzer::WriteVector_GlobalEvaluationData
enum  CombineMode { CM_Sum, CM_Max, CM_Min, CM_Insert }
 when you gho from ghost to global, combine with a particular mode More...
 

Detailed Description

This class encapsulates the needs of a gather operation to do a // halo exchange for blocked vectors. //.

// JMG: What all needs to change for this class?

Definition at line 40 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

Constructor & Destructor Documentation

panzer::BlockedVector_Write_GlobalEvaluationData::BlockedVector_Write_GlobalEvaluationData ( )

Default Constructor.

Definition at line 34 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

panzer::BlockedVector_Write_GlobalEvaluationData::BlockedVector_Write_GlobalEvaluationData ( const BlockedVector_Write_GlobalEvaluationData src)

Copy Constructor.

Parameters
[in]srcThe object to be copied.

Definition at line 45 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

panzer::BlockedVector_Write_GlobalEvaluationData::BlockedVector_Write_GlobalEvaluationData ( const Teuchos::RCP< const Thyra::VectorSpaceBase< double >>  ghostedSpace,
const Teuchos::RCP< const Thyra::VectorSpaceBase< double >>  ownedSpace,
const std::vector< Teuchos::RCP< WriteVector_GlobalEvaluationData >> &  gedBlocks 
)

Initializing Constructor.

Parameters
[in]ghostedSpaceA DefaultProductVectorSpace corresponding to the ghosted vector.
[in]ownedSpaceA DefaultProductVectorSpace corresponding to the owned vector. It's currently ignored, but it's included for future changes.
[in]gedBlocksGlobalEvaluationData objects that handle each block of the vector.

Definition at line 59 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

virtual panzer::BlockedVector_Write_GlobalEvaluationData::~BlockedVector_Write_GlobalEvaluationData ( )
inlinevirtual

Destructor.

Definition at line 79 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

Member Function Documentation

void panzer::BlockedVector_Write_GlobalEvaluationData::initialize ( const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> &  ghostedSpace,
const Teuchos::RCP< const Thyra::VectorSpaceBase< double >> &  ownedSpace,
const std::vector< Teuchos::RCP< WriteVector_GlobalEvaluationData >> &  gedBlocks 
)

Initialize this object using the sub-GlobalEvaluationData objects.

You must specify the owned and ghosted spaces. At completion, isInitialized_ will be set to true.

Parameters
[in]ghostedSpaceA DefaultProductVectorSpace corresponding to the ghosted vector.
[in]ownedSpaceA DefaultProductVectorSpace corresponding to the owned vector. It's currently ignored, but it's included for future changes.
[in]gedBlocksGlobalEvaluationData objects that handle each block of the vector.

Definition at line 77 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

virtual bool panzer::BlockedVector_Write_GlobalEvaluationData::isInitialized ( ) const
inlinevirtual

Is this object initialized?

Returns
Whether or not the object is initialized.

Implements panzer::WriteVector_GlobalEvaluationData.

Definition at line 111 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

void panzer::BlockedVector_Write_GlobalEvaluationData::ghostToGlobal ( int  mem)
virtual

Communicate the ghosted data to the owned 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::WriteVector_GlobalEvaluationData.

Definition at line 109 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

void panzer::BlockedVector_Write_GlobalEvaluationData::initializeData ( )
virtual

Initialize internal data for communication.

This clears out the ghosted vector. // JMG: Is this right?

Implements panzer::GlobalEvaluationData.

Definition at line 128 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

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

Set the owned vector.

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

Definition at line 146 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

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

Get the owned vector.

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

Implements panzer::WriteVector_GlobalEvaluationData.

Definition at line 173 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

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

Get the ghosted vector.

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

Implements panzer::WriteVector_GlobalEvaluationData.

Definition at line 185 of file Panzer_BlockedVector_Write_GlobalEvaluationData.cpp.

size_t panzer::BlockedVector_Write_GlobalEvaluationData::getBlockCount ( ) const
inline

How many blocks do we have?

Returns
The number of blocks in this GlobalEvaluationData object.

Definition at line 168 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

Teuchos::RCP<WriteVector_GlobalEvaluationData> panzer::BlockedVector_Write_GlobalEvaluationData::getGEDBlock ( int  i)
inline

Get the i-th block (non const version).

Returns
This object's i-th GlobalEvaluationData block.

Definition at line 179 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

Teuchos::RCP<const WriteVector_GlobalEvaluationData> panzer::BlockedVector_Write_GlobalEvaluationData::getGEDBlock ( int  i) const
inline

Get the i-th block (const version).

Returns
This object's i-th GlobalEvaluationData block.

Definition at line 191 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

bool panzer::BlockedVector_Write_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. // JMG: But why?

Implements panzer::GlobalEvaluationData.

Definition at line 205 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

Member Data Documentation

bool panzer::BlockedVector_Write_GlobalEvaluationData::isInitialized_
private

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

Definition at line 216 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

std::vector<Teuchos::RCP<WriteVector_GlobalEvaluationData> > panzer::BlockedVector_Write_GlobalEvaluationData::gedBlocks_
private

A vector of the GlobalEvaluationData blocks.

Definition at line 221 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

Teuchos::RCP<Thyra::VectorBase<double> > panzer::BlockedVector_Write_GlobalEvaluationData::ownedVector_
private

The owned vector.

Definition at line 226 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.

Teuchos::RCP<const Thyra::DefaultProductVectorSpace<double> > panzer::BlockedVector_Write_GlobalEvaluationData::ghostedSpace_
private

The vector space corresponding to the ghosted vector.

Definition at line 232 of file Panzer_BlockedVector_Write_GlobalEvaluationData.hpp.


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