Panzer  Version of the Day
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > Class Template Referenceabstract

#include <Panzer_GatherOrientation_decl.hpp>

Inheritance diagram for panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >:
Inheritance graph
[legend]

Classes

class  CopyCellLIDsFunctor
 

Public Member Functions

virtual ~UniqueGlobalIndexer ()=0
 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 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 void getElementOrientation (LocalOrdinalT 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< LocalOrdinalT > & getElementBlock (const std::string &blockId) const =0
 
virtual void getElementGIDs (LocalOrdinalT localElmtId, std::vector< GlobalOrdinalT > &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< GlobalOrdinalT > &indices) const =0
 
virtual void getOwnedAndGhostedIndices (std::vector< GlobalOrdinalT > &indices) const =0
 
virtual void ownedIndices (const std::vector< GlobalOrdinalT > &indices, std::vector< bool > &isOwned) const =0
 
const std::vector< LocalOrdinalT > & getElementLIDs (LocalOrdinalT localElmtId) const
 
void getElementLIDs (Kokkos::View< const int *, PHX::Device > cellIds, Kokkos::View< LocalOrdinalT **, 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 int getElementBlockGIDCount (const std::size_t &blockIndex) const =0
 How any GIDs are associate with a particular element block. More...
 
virtual Teuchos::RCP< const ConnManagerBase< LocalOrdinalT > > getConnManagerBase () const =0
 Returns the connection manager currently being used. More...
 
- Public Member Functions inherited from panzer::UniqueGlobalIndexerBase
virtual ~UniqueGlobalIndexerBase ()=0
 Pure virtual destructor: prevents warnings with inline empty implementation. More...
 
virtual const std::string & getFieldString (int num) const =0
 Reverse lookup of the field string from a field number. More...
 

Protected Member Functions

void buildLocalIds ()
 
void buildLocalIdsFromOwnedElements (std::vector< std::vector< LocalOrdinalT > > &localIDs) const
 
void setLocalIds (const std::vector< std::vector< LocalOrdinalT > > &localIDs)
 
void shareLocalIDs (const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > &src)
 

Private Attributes

std::vector< std::vector< LocalOrdinalT > > localIDs_
 
Kokkos::View< const LocalOrdinalT **, PHX::Device > localIDs_k_
 

Detailed Description

template<typename LocalOrdinalT, typename GlobalOrdinalT>
class panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >

Definition at line 61 of file Panzer_GatherOrientation_decl.hpp.

Constructor & Destructor Documentation

◆ ~UniqueGlobalIndexer()

template<typename LocalOrdinalT , typename GlobalOrdinalT >
panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::~UniqueGlobalIndexer ( )
inlinepure virtual

Pure virtual destructor: prevents warnings with inline empty implementation.

Definition at line 375 of file Panzer_UniqueGlobalIndexer.hpp.

Member Function Documentation

◆ getComm()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual Teuchos::RCP<Teuchos::Comm<int> > panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getComm ( ) const
pure virtual

◆ getNumFields()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual int panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getNumFields ( ) const
pure virtual

◆ getFieldNum()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual int panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::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.

Implements panzer::UniqueGlobalIndexerBase.

Implemented in panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >, panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

◆ getFieldOrder()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getFieldOrder ( std::vector< std::string > &  fieldOrder) const
pure virtual

◆ getElementBlockIds()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getElementBlockIds ( std::vector< std::string > &  elementBlockIds) const
pure virtual

◆ fieldInBlock()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual bool panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::fieldInBlock ( const std::string &  field,
const std::string &  block 
) const
pure virtual

◆ getBlockFieldNumbers()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual const std::vector<int>& panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getBlockFieldNumbers ( const std::string &  blockId) const
pure virtual

◆ getGIDFieldOffsets()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual const std::vector<int>& panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getGIDFieldOffsets ( const std::string &  blockId,
int  fieldNum 
) const
pure virtual

◆ getGIDFieldOffsets_closure()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual const std::pair<std::vector<int>,std::vector<int> >& panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::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

Implements panzer::UniqueGlobalIndexerBase.

Implemented in panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >, panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

◆ getElementOrientation()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getElementOrientation ( LocalOrdinalT  localElmtId,
std::vector< double > &  gidsOrientation 
) const
pure virtual

◆ getElementBlock()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual const std::vector<LocalOrdinalT>& panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::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< LocalOrdinalT, GlobalOrdinalT >, panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

◆ getElementGIDs()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getElementGIDs ( LocalOrdinalT  localElmtId,
std::vector< GlobalOrdinalT > &  gids,
const std::string &  blockIdHint = "" 
) const
pure virtual

◆ getOwnedIndices()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getOwnedIndices ( std::vector< GlobalOrdinalT > &  indices) const
pure virtual

◆ getOwnedAndGhostedIndices()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getOwnedAndGhostedIndices ( std::vector< GlobalOrdinalT > &  indices) const
pure virtual

◆ ownedIndices()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::ownedIndices ( const std::vector< GlobalOrdinalT > &  indices,
std::vector< bool > &  isOwned 
) const
pure virtual

◆ getElementLIDs() [1/2]

template<typename LocalOrdinalT, typename GlobalOrdinalT>
const std::vector<LocalOrdinalT>& panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getElementLIDs ( LocalOrdinalT  localElmtId) const
inline

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

Definition at line 256 of file Panzer_UniqueGlobalIndexer.hpp.

◆ getElementLIDs() [2/2]

template<typename LocalOrdinalT, typename GlobalOrdinalT>
void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getElementLIDs ( Kokkos::View< const int *, PHX::Device >  cellIds,
Kokkos::View< LocalOrdinalT **, 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 262 of file Panzer_UniqueGlobalIndexer.hpp.

◆ getElementBlockGIDCount() [1/2]

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual int panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::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.

Implements panzer::UniqueGlobalIndexerBase.

Implemented in panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >, panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

◆ getElementBlockGIDCount() [2/2]

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual int panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::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.

Implements panzer::UniqueGlobalIndexerBase.

Implemented in panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >, panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

◆ getConnManagerBase()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual Teuchos::RCP<const ConnManagerBase<LocalOrdinalT> > panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getConnManagerBase ( ) const
pure virtual

◆ buildLocalIds()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::buildLocalIds ( )
inlineprotected

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

Definition at line 313 of file Panzer_UniqueGlobalIndexer.hpp.

◆ buildLocalIdsFromOwnedElements()

template<typename LocalOrdinalT, typename GlobalOrdinalT >
void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::buildLocalIdsFromOwnedElements ( std::vector< std::vector< LocalOrdinalT > > &  localIDs) const
inlineprotected

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

Definition at line 379 of file Panzer_UniqueGlobalIndexer.hpp.

◆ setLocalIds()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::setLocalIds ( const std::vector< std::vector< LocalOrdinalT > > &  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 334 of file Panzer_UniqueGlobalIndexer.hpp.

◆ shareLocalIDs()

template<typename LocalOrdinalT, typename GlobalOrdinalT>
void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::shareLocalIDs ( const UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > &  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 359 of file Panzer_UniqueGlobalIndexer.hpp.

Member Data Documentation

◆ localIDs_

template<typename LocalOrdinalT, typename GlobalOrdinalT>
std::vector<std::vector<LocalOrdinalT> > panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::localIDs_
private

Definition at line 366 of file Panzer_UniqueGlobalIndexer.hpp.

◆ localIDs_k_

template<typename LocalOrdinalT, typename GlobalOrdinalT>
Kokkos::View<const LocalOrdinalT**,PHX::Device> panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::localIDs_k_
private

Definition at line 367 of file Panzer_UniqueGlobalIndexer.hpp.


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