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::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
 Get the set of indices owned by this processor. More...
 
virtual void getGhostedIndices (std::vector< GlobalOrdinalT > &indices) const =0
 Get the set of indices ghosted for this processor. More...
 
virtual void getOwnedAndGhostedIndices (std::vector< GlobalOrdinalT > &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< GlobalOrdinalT > &indices, std::vector< bool > &isOwned) const =0
 
const Kokkos::View< const
LocalOrdinalT
*, Kokkos::LayoutRight,
PHX::Device > 
getElementLIDs (LocalOrdinalT localElmtId) const
 
const Kokkos::View< const
LocalOrdinalT
**, Kokkos::LayoutRight,
PHX::Device > 
getLIDs () 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

Kokkos::View< const
LocalOrdinalT
**, Kokkos::LayoutRight,
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

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

Pure virtual destructor: prevents warnings with inline empty implementation.

Definition at line 423 of file Panzer_UniqueGlobalIndexer.hpp.

Member Function Documentation

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual Teuchos::RCP<Teuchos::Comm<int> > panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getComm ( ) const
pure virtual
template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual int panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getNumFields ( ) const
pure virtual
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< LO, GO >, panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >, and panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getFieldOrder ( std::vector< std::string > &  fieldOrder) const
pure virtual
template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getElementBlockIds ( std::vector< std::string > &  elementBlockIds) const
pure virtual
template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual bool panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::fieldInBlock ( const std::string &  field,
const std::string &  block 
) const
pure virtual
template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual const std::vector<int>& panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getBlockFieldNumbers ( const std::string &  blockId) const
pure virtual
template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual const std::vector<int>& panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getGIDFieldOffsets ( const std::string &  blockId,
int  fieldNum 
) const
pure virtual
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< LO, GO >, panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >, and panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getElementOrientation ( LocalOrdinalT  localElmtId,
std::vector< double > &  gidsOrientation 
) const
pure virtual
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< LO, GO >, panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >, and panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >.

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

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

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

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getOwnedIndices ( std::vector< GlobalOrdinalT > &  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< LocalOrdinalT, GlobalOrdinalT >, panzer::DOFManager< LO, GO >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getGhostedIndices ( std::vector< GlobalOrdinalT > &  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< LocalOrdinalT, GlobalOrdinalT >, panzer::DOFManager< LO, GO >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getOwnedAndGhostedIndices ( std::vector< GlobalOrdinalT > &  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< LocalOrdinalT, GlobalOrdinalT >, panzer::DOFManager< LO, GO >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual int panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::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< LocalOrdinalT, GlobalOrdinalT >, panzer::DOFManager< LO, GO >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual int panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::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< LocalOrdinalT, GlobalOrdinalT >, panzer::DOFManager< LO, GO >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual int panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::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< LocalOrdinalT, GlobalOrdinalT >, panzer::DOFManager< LO, GO >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual void panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::ownedIndices ( const std::vector< GlobalOrdinalT > &  indices,
std::vector< bool > &  isOwned 
) const
pure virtual
template<typename LocalOrdinalT, typename GlobalOrdinalT>
const Kokkos::View<const LocalOrdinalT*,Kokkos::LayoutRight,PHX::Device> 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 302 of file Panzer_UniqueGlobalIndexer.hpp.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
const Kokkos::View<const LocalOrdinalT**,Kokkos::LayoutRight,PHX::Device> panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getLIDs ( ) const
inline

Return all the element LIDS for a given indexer

Definition at line 307 of file Panzer_UniqueGlobalIndexer.hpp.

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 313 of file Panzer_UniqueGlobalIndexer.hpp.

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< LO, GO >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

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< LO, GO >, and panzer::Filtered_UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.

template<typename LocalOrdinalT, typename GlobalOrdinalT>
virtual Teuchos::RCP<const ConnManagerBase<LocalOrdinalT> > panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >::getConnManagerBase ( ) const
pure virtual
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 364 of file Panzer_UniqueGlobalIndexer.hpp.

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 427 of file Panzer_UniqueGlobalIndexer.hpp.

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 385 of file Panzer_UniqueGlobalIndexer.hpp.

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 409 of file Panzer_UniqueGlobalIndexer.hpp.

Member Data Documentation

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

Definition at line 415 of file Panzer_UniqueGlobalIndexer.hpp.


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