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

#include <Panzer_GlobalIndexer.hpp>

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

Classes

class  CopyCellLIDsFunctor
 

Public Member Functions

virtual ~GlobalIndexer ()
 Pure virtual destructor: prevents warnings with inline empty implementation. More...
 
virtual Teuchos::RCP
< Teuchos::Comm< int > > 
getComm () const =0
 
virtual int getNumFields () const =0
 
virtual int getFieldNum (const std::string &str) const =0
 Get the number used for access to this field. More...
 
virtual void getFieldOrder (std::vector< std::string > &fieldOrder) const =0
 
virtual const std::string & getFieldString (int num) const =0
 Reverse lookup of the field string from a field number. More...
 
virtual void getElementBlockIds (std::vector< std::string > &elementBlockIds) const =0
 
virtual bool fieldInBlock (const std::string &field, const std::string &block) const =0
 
virtual const std::vector< int > & getBlockFieldNumbers (const std::string &blockId) const =0
 
virtual const std::vector< int > & getGIDFieldOffsets (const std::string &blockId, int fieldNum) const =0
 Use the field pattern so that you can find a particular field in the GIDs array. More...
 
virtual const std::pair
< std::vector< int >
, std::vector< int > > & 
getGIDFieldOffsets_closure (const std::string &blockId, int fieldNum, int subcellDim, int subcellId) const =0
 Use the field pattern so that you can find a particular field in the GIDs array. This version lets you specify the sub cell you are interested in and gets the closure. Meaning all the IDs of equal or lesser sub cell dimension that are contained within the specified sub cell. For instance for an edge, this function would return offsets for the edge and the nodes on that edge. More...
 
virtual int getElementBlockGIDCount (const std::size_t &blockIndex) const =0
 How any GIDs are associate with a particular element block. More...
 
virtual void getElementOrientation (panzer::LocalOrdinal localElmtId, std::vector< double > &gidsOrientation) const =0
 Get a vector containg the orientation of the GIDs relative to the neighbors. More...
 
virtual const std::vector
< panzer::LocalOrdinal > & 
getElementBlock (const std::string &blockId) const =0
 
virtual void getElementGIDs (panzer::LocalOrdinal localElmtId, std::vector< panzer::GlobalOrdinal > &gids, const std::string &blockIdHint="") const =0
 Get the global IDs for a particular element. This function overwrites the gids variable. More...
 
virtual void getOwnedIndices (std::vector< panzer::GlobalOrdinal > &indices) const =0
 Get the set of indices owned by this processor. More...
 
virtual void getGhostedIndices (std::vector< panzer::GlobalOrdinal > &indices) const =0
 Get the set of indices ghosted for this processor. More...
 
virtual void getOwnedAndGhostedIndices (std::vector< panzer::GlobalOrdinal > &indices) const =0
 Get the set of owned and ghosted indices for this processor. More...
 
virtual int getNumOwned () const =0
 Get the number of indices owned by this processor. More...
 
virtual int getNumGhosted () const =0
 Get the number of indices ghosted for this processor. More...
 
virtual int getNumOwnedAndGhosted () const =0
 Get the number of owned and ghosted indices for this processor. More...
 
virtual void ownedIndices (const std::vector< panzer::GlobalOrdinal > &indices, std::vector< bool > &isOwned) const =0
 
const Kokkos::View< const
panzer::LocalOrdinal
*, Kokkos::LayoutRight,
PHX::Device > 
getElementLIDs (panzer::LocalOrdinal localElmtId) const
 
const Kokkos::View< const
panzer::LocalOrdinal
**, Kokkos::LayoutRight,
PHX::Device > 
getLIDs () const
 
void getElementLIDs (Kokkos::View< const int *, PHX::Device > cellIds, Kokkos::View< panzer::LocalOrdinal **, PHX::Device > lids) const
 
virtual int getElementBlockGIDCount (const std::string &blockId) const =0
 How many GIDs are associate with a particular element block. More...
 
virtual Teuchos::RCP< const
ConnManager
getConnManager () const =0
 Returns the connection manager currently being used. More...
 

Protected Member Functions

void buildLocalIds ()
 
void buildLocalIdsFromOwnedElements (std::vector< std::vector< panzer::LocalOrdinal > > &localIDs) const
 
void setLocalIds (const std::vector< std::vector< panzer::LocalOrdinal > > &localIDs)
 
void shareLocalIDs (const GlobalIndexer &src)
 

Private Attributes

Kokkos::View< const
panzer::LocalOrdinal
**, Kokkos::LayoutRight,
PHX::Device > 
localIDs_k_
 

Epetra related functions. NOTE: for use with Epetra only! Will be deprecated when we drop epetra support!

virtual void getElementGIDsAsInt (panzer::LocalOrdinal localElmtId, std::vector< int > &gids, const std::string &blockIdHint="") const =0
 Get the global IDs for a particular element. This function overwrites the gids variable. More...
 
virtual void getOwnedIndicesAsInt (std::vector< int > &indices) const =0
 Get the set of indices owned by this processor. More...
 
virtual void getGhostedIndicesAsInt (std::vector< int > &indices) const =0
 Get the set of indices ghosted for this processor. More...
 
virtual void getOwnedAndGhostedIndicesAsInt (std::vector< int > &indices) const =0
 Get the set of owned and ghosted indices for this processor. More...
 

Detailed Description

Definition at line 59 of file Panzer_GlobalIndexer.hpp.

Constructor & Destructor Documentation

virtual panzer::GlobalIndexer::~GlobalIndexer ( )
inlinevirtual

Pure virtual destructor: prevents warnings with inline empty implementation.

Definition at line 62 of file Panzer_GlobalIndexer.hpp.

Member Function Documentation

virtual Teuchos::RCP<Teuchos::Comm<int> > panzer::GlobalIndexer::getComm ( ) const
pure virtual

Get communicator associated with this global indexer.

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual int panzer::GlobalIndexer::getNumFields ( ) const
pure virtual

Get the number of fields (total) stored by this DOF manager

Implemented in panzer::BlockedDOFManager, panzer::Filtered_GlobalIndexer, and panzer::DOFManager.

virtual int panzer::GlobalIndexer::getFieldNum ( const std::string &  str) const
pure virtual

Get the number used for access to this field.

Get the number used for access to this field. This is used as the input parameter to the other functions that provide access to the global unknowns.

Parameters
[in]strHuman readable name of the field
Returns
A unique integer associated with the field if the field exisits. Otherwise a -1 is returned.

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual void panzer::GlobalIndexer::getFieldOrder ( std::vector< std::string > &  fieldOrder) const
pure virtual

Get the field order used by this global indexer.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual const std::string& panzer::GlobalIndexer::getFieldString ( int  num) const
pure virtual

Reverse lookup of the field string from a field number.

Parameters
[in]numField number. Assumed to be a valid field number. Computed from getFieldNum.
Returns
Field name.

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual void panzer::GlobalIndexer::getElementBlockIds ( std::vector< std::string > &  elementBlockIds) const
pure virtual

What are the blockIds included in this connection manager?

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual bool panzer::GlobalIndexer::fieldInBlock ( const std::string &  field,
const std::string &  block 
) const
pure virtual

Is the specified field in the element block?

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual const std::vector<int>& panzer::GlobalIndexer::getBlockFieldNumbers ( const std::string &  blockId) const
pure virtual

Get field numbers associated with a particular element block.

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual const std::vector<int>& panzer::GlobalIndexer::getGIDFieldOffsets ( const std::string &  blockId,
int  fieldNum 
) const
pure virtual

Use the field pattern so that you can find a particular field in the GIDs array.

Implemented in panzer::Filtered_GlobalIndexer, panzer::DOFManager, and panzer::BlockedDOFManager.

virtual const std::pair<std::vector<int>,std::vector<int> >& panzer::GlobalIndexer::getGIDFieldOffsets_closure ( const std::string &  blockId,
int  fieldNum,
int  subcellDim,
int  subcellId 
) const
pure virtual

Use the field pattern so that you can find a particular field in the GIDs array. This version lets you specify the sub cell you are interested in and gets the closure. Meaning all the IDs of equal or lesser sub cell dimension that are contained within the specified sub cell. For instance for an edge, this function would return offsets for the edge and the nodes on that edge.

Parameters
[in]blockId
[in]fieldNum
[in]subcellDim
[in]subcellId

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual int panzer::GlobalIndexer::getElementBlockGIDCount ( const std::size_t &  blockIndex) const
pure virtual

How any GIDs are associate with a particular element block.

This is a per-element count. If you have a quad element with two piecewise bi-linear fields this method returns 8.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual void panzer::GlobalIndexer::getElementOrientation ( panzer::LocalOrdinal  localElmtId,
std::vector< double > &  gidsOrientation 
) const
pure virtual

Get a vector containg the orientation of the GIDs relative to the neighbors.

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual const std::vector<panzer::LocalOrdinal>& panzer::GlobalIndexer::getElementBlock ( const std::string &  blockId) const
pure virtual

Get the local element IDs for a paricular element block.

Parameters
[in]blockIdBlock ID
Returns
Vector of local element IDs.

Implemented in panzer::DOFManager, panzer::Filtered_GlobalIndexer, and panzer::BlockedDOFManager.

virtual void panzer::GlobalIndexer::getElementGIDs ( panzer::LocalOrdinal  localElmtId,
std::vector< panzer::GlobalOrdinal > &  gids,
const std::string &  blockIdHint = "" 
) const
pure virtual

Get the global IDs for a particular element. This function overwrites the gids variable.

Implemented in panzer::Filtered_GlobalIndexer, panzer::DOFManager, and panzer::BlockedDOFManager.

virtual void panzer::GlobalIndexer::getOwnedIndices ( std::vector< panzer::GlobalOrdinal > &  indices) const
pure virtual

Get the set of indices owned by this processor.

Parameters
[out]Avector that will be filled with the indices owned by this processor.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual void panzer::GlobalIndexer::getGhostedIndices ( std::vector< panzer::GlobalOrdinal > &  indices) const
pure virtual

Get the set of indices ghosted for this processor.

Parameters
[out]Avector that will be filled with the indices ghosted for this processor.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual void panzer::GlobalIndexer::getOwnedAndGhostedIndices ( std::vector< panzer::GlobalOrdinal > &  indices) const
pure virtual

Get the set of owned and ghosted indices for this processor.

Parameters
[out]Avector that will be filled with the owned and ghosted indices for this processor.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual void panzer::GlobalIndexer::getElementGIDsAsInt ( panzer::LocalOrdinal  localElmtId,
std::vector< int > &  gids,
const std::string &  blockIdHint = "" 
) const
pure virtual

Get the global IDs for a particular element. This function overwrites the gids variable.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual void panzer::GlobalIndexer::getOwnedIndicesAsInt ( std::vector< int > &  indices) const
pure virtual

Get the set of indices owned by this processor.

Parameters
[out]Avector that will be filled with the indices owned by this processor.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual void panzer::GlobalIndexer::getGhostedIndicesAsInt ( std::vector< int > &  indices) const
pure virtual

Get the set of indices ghosted for this processor.

Parameters
[out]Avector that will be filled with the indices ghosted for this processor.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual void panzer::GlobalIndexer::getOwnedAndGhostedIndicesAsInt ( std::vector< int > &  indices) const
pure virtual

Get the set of owned and ghosted indices for this processor.

Parameters
[out]Avector that will be filled with the owned and ghosted indices for this processor.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual int panzer::GlobalIndexer::getNumOwned ( ) const
pure virtual

Get the number of indices owned by this processor.

Returns
The number of indices owned by this processor.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual int panzer::GlobalIndexer::getNumGhosted ( ) const
pure virtual

Get the number of indices ghosted for this processor.

Returns
The number of indices ghosted for this processor.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual int panzer::GlobalIndexer::getNumOwnedAndGhosted ( ) const
pure virtual

Get the number of owned and ghosted indices for this processor.

Returns
The number of owned and ghosted indices for this processor.

Implemented in panzer::BlockedDOFManager, panzer::Filtered_GlobalIndexer, and panzer::DOFManager.

virtual void panzer::GlobalIndexer::ownedIndices ( const std::vector< panzer::GlobalOrdinal > &  indices,
std::vector< bool > &  isOwned 
) const
pure virtual

Get a yes/no on ownership for each index in a vector

Implemented in panzer::DOFManager, panzer::BlockedDOFManager, and panzer::Filtered_GlobalIndexer.

const Kokkos::View<const panzer::LocalOrdinal*,Kokkos::LayoutRight,PHX::Device> panzer::GlobalIndexer::getElementLIDs ( panzer::LocalOrdinal  localElmtId) const
inline

Access the local IDs for an element. The local ordering is according to the getOwnedAndGhostedIndices method.

Definition at line 253 of file Panzer_GlobalIndexer.hpp.

const Kokkos::View<const panzer::LocalOrdinal**,Kokkos::LayoutRight,PHX::Device> panzer::GlobalIndexer::getLIDs ( ) const
inline

Return all the element LIDS for a given indexer

Definition at line 258 of file Panzer_GlobalIndexer.hpp.

void panzer::GlobalIndexer::getElementLIDs ( Kokkos::View< const int *, PHX::Device >  cellIds,
Kokkos::View< panzer::LocalOrdinal **, PHX::Device >  lids 
) const
inline

Access the local IDs for an element. The local ordering is according to the getOwnedAndGhostedIndices method. Note

Definition at line 264 of file Panzer_GlobalIndexer.hpp.

virtual int panzer::GlobalIndexer::getElementBlockGIDCount ( const std::string &  blockId) const
pure virtual

How many GIDs are associate with a particular element block.

This is a per-element count. If you have a quad element with two piecewise bi-linear fields this method returns 8.

Implemented in panzer::BlockedDOFManager, panzer::DOFManager, and panzer::Filtered_GlobalIndexer.

virtual Teuchos::RCP<const ConnManager> panzer::GlobalIndexer::getConnManager ( ) const
pure virtual

Returns the connection manager currently being used.

Implemented in panzer::BlockedDOFManager, panzer::Filtered_GlobalIndexer, and panzer::DOFManager.

void panzer::GlobalIndexer::buildLocalIds ( )
inlineprotected

This method is used by derived classes to the construct the local IDs from the getOwnedAndGhostedIndices method.

Definition at line 308 of file Panzer_GlobalIndexer.hpp.

void panzer::GlobalIndexer::buildLocalIdsFromOwnedElements ( std::vector< std::vector< panzer::LocalOrdinal > > &  localIDs) const
inlineprotected

This method is used by derived classes to the construct the local IDs from the getOwnedAndGhostedIndices method.

Definition at line 363 of file Panzer_GlobalIndexer.hpp.

void panzer::GlobalIndexer::setLocalIds ( const std::vector< std::vector< panzer::LocalOrdinal > > &  localIDs)
inlineprotected

This method provides some capability to set the local IDs externally without using the default buildLocalIds. The point is that we want to keep "getElementLIDs" access exteremly fast.

Definition at line 329 of file Panzer_GlobalIndexer.hpp.

void panzer::GlobalIndexer::shareLocalIDs ( const GlobalIndexer src)
inlineprotected

Access internal state and share the local ID fields. This allows decorators classes to be defined and still not loose the performance benefit of the fast getElementLIDs methods. Note that this copies from a distinct UGI into this object.

Definition at line 353 of file Panzer_GlobalIndexer.hpp.

Member Data Documentation

Kokkos::View<const panzer::LocalOrdinal**,Kokkos::LayoutRight,PHX::Device> panzer::GlobalIndexer::localIDs_k_
private

Definition at line 359 of file Panzer_GlobalIndexer.hpp.


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