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::Filtered_GlobalIndexer Class Reference

#include <Panzer_Filtered_GlobalIndexer.hpp>

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

Public Member Functions

 Filtered_GlobalIndexer ()
 
void initialize (const Teuchos::RCP< const GlobalIndexer > &ugi, const std::vector< panzer::GlobalOrdinal > &filteredIndices)
 
void getOwnedAndGhostedNotFilteredIndicator (std::vector< int > &indicator) const
 
void getFilteredOwnedAndGhostedIndices (std::vector< panzer::GlobalOrdinal > &indices) const
 
virtual void getOwnedIndices (std::vector< panzer::GlobalOrdinal > &indices) const
 Get the set of indices owned by this processor. More...
 
virtual void getGhostedIndices (std::vector< panzer::GlobalOrdinal > &indices) const
 Get the set of indices ghosted for this processor. More...
 
virtual void getOwnedAndGhostedIndices (std::vector< panzer::GlobalOrdinal > &indices) const
 Get the set of owned and ghosted indices for this processor. More...
 
virtual void getElementGIDsAsInt (panzer::LocalOrdinal localElmtId, std::vector< int > &gids, const std::string &blockIdHint="") const
 Get the global IDs for a particular element. This function overwrites the gids variable. More...
 
virtual void getOwnedIndicesAsInt (std::vector< int > &indices) const
 Get the set of indices owned by this processor. More...
 
virtual void getGhostedIndicesAsInt (std::vector< int > &indices) const
 Get the set of indices ghosted for this processor. More...
 
virtual void getOwnedAndGhostedIndicesAsInt (std::vector< int > &indices) const
 Get the set of owned and ghosted indices for this processor. More...
 
virtual int getNumOwned () const
 Get the number of indices owned by this processor. More...
 
virtual int getNumGhosted () const
 Get the number of indices ghosted for this processor. More...
 
virtual int getNumOwnedAndGhosted () const
 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
 
virtual ~Filtered_GlobalIndexer ()
 
virtual Teuchos::RCP
< Teuchos::Comm< int > > 
getComm () const
 
virtual int getNumFields () const
 
virtual const std::string & getFieldString (int fieldNum) const
 Reverse lookup of the field string from a field number. More...
 
virtual int getFieldNum (const std::string &str) const
 Get the number used for access to this field. More...
 
virtual void getFieldOrder (std::vector< std::string > &fieldOrder) const
 
virtual void getElementBlockIds (std::vector< std::string > &elementBlockIds) const
 
virtual bool fieldInBlock (const std::string &field, const std::string &block) const
 
virtual const std::vector< int > & getBlockFieldNumbers (const std::string &blockId) const
 
virtual const std::vector< int > & getGIDFieldOffsets (const std::string &blockId, int fieldNum) const
 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
 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 (panzer::LocalOrdinal localElmtId, std::vector< double > &gidsOrientation) const
 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
 
virtual void getElementGIDs (panzer::LocalOrdinal localElmtId, std::vector< panzer::GlobalOrdinal > &gids, const std::string &blockIdHint="") const
 Get the global IDs for a particular element. This function overwrites the gids variable. More...
 
virtual int getElementBlockGIDCount (const std::string &blockId) const
 How many GIDs are associated with each element in a particular element block. More...
 
virtual int getElementBlockGIDCount (const std::size_t &blockIndex) const
 How any GIDs are associate with each element in a particular element block. More...
 
virtual Teuchos::RCP< const
ConnManager
getConnManager () const
 Returns the connection manager currently being used. More...
 
- Public Member Functions inherited from panzer::GlobalIndexer
virtual ~GlobalIndexer ()
 Pure virtual destructor: prevents warnings with inline empty implementation. More...
 
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
 
template<typename ArrayT >
void getElementLIDs (PHX::View< const int * > cellIds, ArrayT lids, const int num_dofs=0) const
 

Private Attributes

Teuchos::RCP< const GlobalIndexerbase_
 
std::vector
< panzer::GlobalOrdinal > 
owned_
 The list of owned indices. More...
 
std::vector
< panzer::GlobalOrdinal > 
ghosted_
 The list of ghosted indices. More...
 

Additional Inherited Members

- Protected Member Functions inherited from panzer::GlobalIndexer
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)
 

Detailed Description

This class wraps a DOFManager and removes certain DOFs from the linear system. This is used to filter out or remove boundary conditions from a DOFManager.

Definition at line 54 of file Panzer_Filtered_GlobalIndexer.hpp.

Constructor & Destructor Documentation

panzer::Filtered_GlobalIndexer::Filtered_GlobalIndexer ( )

Default constructor

Definition at line 58 of file Panzer_Filtered_GlobalIndexer.cpp.

virtual panzer::Filtered_GlobalIndexer::~Filtered_GlobalIndexer ( )
inlinevirtual

Definition at line 211 of file Panzer_Filtered_GlobalIndexer.hpp.

Member Function Documentation

void panzer::Filtered_GlobalIndexer::initialize ( const Teuchos::RCP< const GlobalIndexer > &  ugi,
const std::vector< panzer::GlobalOrdinal > &  filteredIndices 
)

Initialize method that allows use of the default constructor and may help with further inheritence.

Parameters
[in]ugiThe global indexer to filter the global IDs of
[in]filteredIndicesIndices to be filtered out of the ugi argument
Note
Repeated or unused (not in ugi.getOwnedIndices)indices in filteredIndices are ignored without detection or impact.

Definition at line 63 of file Panzer_Filtered_GlobalIndexer.cpp.

void panzer::Filtered_GlobalIndexer::getOwnedAndGhostedNotFilteredIndicator ( std::vector< int > &  indicator) const

Get an indicator describing if a particular local GID has been filtered. This method requires communication.

Parameters
[out]indicatorVector the same length of output argument of getOwendAndGhostedIndices. If a value is one it is included (not filtered), if it is zero then the GID has been filtered out.

Definition at line 149 of file Panzer_Filtered_GlobalIndexer.cpp.

void panzer::Filtered_GlobalIndexer::getFilteredOwnedAndGhostedIndices ( std::vector< panzer::GlobalOrdinal > &  indices) const

Get the set of filtered indices that are owned and ghosted.

Parameters
[out]indicesSet of filtered indices

Definition at line 196 of file Panzer_Filtered_GlobalIndexer.cpp.

virtual void panzer::Filtered_GlobalIndexer::getOwnedIndices ( std::vector< panzer::GlobalOrdinal > &  indices) const
inlinevirtual

Get the set of indices owned by this processor.

Note
This is the set of owned indices from the base GlobalIndexer with the filtered indices removed.
Parameters
[out]indicesA vector that will be filled with the indices owned by this processor.

Implements panzer::GlobalIndexer.

Definition at line 100 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual void panzer::Filtered_GlobalIndexer::getGhostedIndices ( std::vector< panzer::GlobalOrdinal > &  indices) const
inlinevirtual

Get the set of indices ghosted for this processor.

Note
This is the set of owned indices from the base GlobalIndexer (UGI) that have been filtered out, combined with the ghosted indices from the base UGI.
Parameters
[out]indicesA vector that will be filled with the indices ghosted for this processor.

Implements panzer::GlobalIndexer.

Definition at line 115 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual void panzer::Filtered_GlobalIndexer::getOwnedAndGhostedIndices ( std::vector< panzer::GlobalOrdinal > &  indices) const
inlinevirtual

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

Note
This is the set of owned and ghosted indices from the base GlobalIndexer, regardless of filtering.
Parameters
[out]indicesA vector that will be filled with the owned and ghosted indices for this processor.

Implements panzer::GlobalIndexer.

Definition at line 130 of file Panzer_Filtered_GlobalIndexer.hpp.

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

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

Implements panzer::GlobalIndexer.

Definition at line 141 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual void panzer::Filtered_GlobalIndexer::getOwnedIndicesAsInt ( std::vector< int > &  indices) const
inlinevirtual

Get the set of indices owned by this processor.

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

Implements panzer::GlobalIndexer.

Definition at line 145 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual void panzer::Filtered_GlobalIndexer::getGhostedIndicesAsInt ( std::vector< int > &  indices) const
inlinevirtual

Get the set of indices ghosted for this processor.

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

Implements panzer::GlobalIndexer.

Definition at line 153 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual void panzer::Filtered_GlobalIndexer::getOwnedAndGhostedIndicesAsInt ( std::vector< int > &  indices) const
inlinevirtual

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.

Implements panzer::GlobalIndexer.

Definition at line 162 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual int panzer::Filtered_GlobalIndexer::getNumOwned ( ) const
inlinevirtual

Get the number of indices owned by this processor.

Note
This is the number of owned indices from the base GlobalIndexer, less the number of filtered indices.
Returns
The number of indices owned by this processor.

Implements panzer::GlobalIndexer.

Definition at line 180 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual int panzer::Filtered_GlobalIndexer::getNumGhosted ( ) const
inlinevirtual

Get the number of indices ghosted for this processor.

Note
This is the number of owned indices from the base GlobalIndexer (UGI) that have been filtered out, plus the number of ghosted indices from the base UGI.
Returns
The number of indices ghosted for this processor.

Implements panzer::GlobalIndexer.

Definition at line 192 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual int panzer::Filtered_GlobalIndexer::getNumOwnedAndGhosted ( ) const
inlinevirtual

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

Note
This is the number of owned and ghosted indices from the base GlobalIndexer, regardless of filtering.
Returns
The number of owned and ghosted indices for this processor.

Implements panzer::GlobalIndexer.

Definition at line 203 of file Panzer_Filtered_GlobalIndexer.hpp.

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

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

Implements panzer::GlobalIndexer.

Definition at line 218 of file Panzer_Filtered_GlobalIndexer.cpp.

virtual Teuchos::RCP<Teuchos::Comm<int> > panzer::Filtered_GlobalIndexer::getComm ( ) const
inlinevirtual

Get communicator associated with this global indexer.

Implements panzer::GlobalIndexer.

Definition at line 213 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual int panzer::Filtered_GlobalIndexer::getNumFields ( ) const
inlinevirtual

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

Implements panzer::GlobalIndexer.

Definition at line 216 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual const std::string& panzer::Filtered_GlobalIndexer::getFieldString ( int  num) const
inlinevirtual

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.

Implements panzer::GlobalIndexer.

Definition at line 219 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual int panzer::Filtered_GlobalIndexer::getFieldNum ( const std::string &  str) const
inlinevirtual

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::GlobalIndexer.

Definition at line 222 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual void panzer::Filtered_GlobalIndexer::getFieldOrder ( std::vector< std::string > &  fieldOrder) const
inlinevirtual

Get the field order used by this global indexer.

Implements panzer::GlobalIndexer.

Definition at line 225 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual void panzer::Filtered_GlobalIndexer::getElementBlockIds ( std::vector< std::string > &  elementBlockIds) const
inlinevirtual

What are the blockIds included in this connection manager?

Implements panzer::GlobalIndexer.

Definition at line 228 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual bool panzer::Filtered_GlobalIndexer::fieldInBlock ( const std::string &  field,
const std::string &  block 
) const
inlinevirtual

Is the specified field in the element block?

Implements panzer::GlobalIndexer.

Definition at line 231 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual const std::vector<int>& panzer::Filtered_GlobalIndexer::getBlockFieldNumbers ( const std::string &  blockId) const
inlinevirtual

Get field numbers associated with a particular element block.

Implements panzer::GlobalIndexer.

Definition at line 234 of file Panzer_Filtered_GlobalIndexer.hpp.

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

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

Implements panzer::GlobalIndexer.

Definition at line 237 of file Panzer_Filtered_GlobalIndexer.hpp.

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

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::GlobalIndexer.

Definition at line 241 of file Panzer_Filtered_GlobalIndexer.hpp.

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

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

Implements panzer::GlobalIndexer.

Definition at line 245 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual const std::vector<panzer::LocalOrdinal>& panzer::Filtered_GlobalIndexer::getElementBlock ( const std::string &  blockId) const
inlinevirtual

Get the local element IDs for a paricular element block.

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

Implements panzer::GlobalIndexer.

Definition at line 248 of file Panzer_Filtered_GlobalIndexer.hpp.

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

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

Implements panzer::GlobalIndexer.

Definition at line 251 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual int panzer::Filtered_GlobalIndexer::getElementBlockGIDCount ( const std::string &  blockId) const
inlinevirtual

How many GIDs are associated with each element in 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::GlobalIndexer.

Definition at line 254 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual int panzer::Filtered_GlobalIndexer::getElementBlockGIDCount ( const std::size_t &  blockIndex) const
inlinevirtual

How any GIDs are associate with each element in 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::GlobalIndexer.

Definition at line 257 of file Panzer_Filtered_GlobalIndexer.hpp.

virtual Teuchos::RCP<const ConnManager> panzer::Filtered_GlobalIndexer::getConnManager ( ) const
inlinevirtual

Returns the connection manager currently being used.

Implements panzer::GlobalIndexer.

Definition at line 260 of file Panzer_Filtered_GlobalIndexer.hpp.

Member Data Documentation

Teuchos::RCP<const GlobalIndexer> panzer::Filtered_GlobalIndexer::base_
private

Definition at line 265 of file Panzer_Filtered_GlobalIndexer.hpp.

std::vector<panzer::GlobalOrdinal> panzer::Filtered_GlobalIndexer::owned_
private

The list of owned indices.

The list of the owned indices from the base GlobalIndexer with the filtered indices removed.

Definition at line 273 of file Panzer_Filtered_GlobalIndexer.hpp.

std::vector<panzer::GlobalOrdinal> panzer::Filtered_GlobalIndexer::ghosted_
private

The list of ghosted indices.

The list of the owned indices from the base GlobalIndexer (UGI) that have been filtered out, combined with the ghosted indices from the base UGI.

Definition at line 282 of file Panzer_Filtered_GlobalIndexer.hpp.


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