Panzer
Version of the Day
|
#include <Panzer_BlockedDOFManager.hpp>
Classes | |
struct | LessThan |
Public Types | |
using | GlobalOrdinal = panzer::GlobalOrdinal |
using | LocalOrdinal = panzer::LocalOrdinal |
using | const_field_iterator = std::map< int, std::string >::const_iterator |
Public Member Functions | |
virtual | ~BlockedDOFManager () |
BlockedDOFManager () | |
BlockedDOFManager (const Teuchos::RCP< ConnManager > &connMngr, MPI_Comm mpiComm) | |
virtual Teuchos::RCP < Teuchos::Comm< int > > | getComm () const |
int | getFieldNum (const std::string &str) const |
Get the number used for access to this field. More... | |
const std::string & | getFieldString (int num) const |
Get the string name associated with a field number. More... | |
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 < LocalOrdinal > & | getElementBlock (const std::string &blockId) const |
virtual const std::vector< int > & | getBlockFieldNumbers (const std::string &block) const |
void | getElementGIDs (panzer::LocalOrdinal localElmtId, std::vector< GlobalOrdinal > &gids, const std::string &blockIdHint="") const |
Get the global IDs for a particular element. This function overwrites the gids variable. More... | |
void | getElementGIDsPair (panzer::LocalOrdinal localElmtId, std::vector< std::pair< int, GlobalOrdinal >> &gids, const std::string &blockIdHint="") const |
Get the global IDs for a particular element. This function overwrites the gids variable. 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< 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. The first vector returned contains the index into the GIDs array. The second vector specifies the basis function IDs. More... | |
virtual void | getOwnedIndices (std::vector< GlobalOrdinal > &indices) const |
Get the set of indices owned by this processor. More... | |
virtual void | getGhostedIndices (std::vector< GlobalOrdinal > &indices) const |
Get the set of indices ghosted for this processor. More... | |
virtual void | getOwnedAndGhostedIndices (std::vector< GlobalOrdinal > &indices) const |
Get the set of owned and ghosted indices for this processor. More... | |
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< GlobalOrdinal > &indices, std::vector< bool > &isOwned) const |
void | setUseDOFManagerFEI (bool useFEI) |
Use the FEI DOF manager internally, or the standard version. More... | |
bool | getUseDOFManagerFEI () const |
which DOF Manager is used internally? More... | |
void | setConnManager (const Teuchos::RCP< ConnManager > &connMngr, MPI_Comm mpiComm) |
Set the connection manager and MPI_Comm objects. More... | |
Teuchos::RCP< const FieldPattern > | getGeometricFieldPattern () const |
Teuchos::RCP< ConnManager > | resetIndices () |
Reset the indicies for this DOF manager. More... | |
void | addField (const std::string &str, const Teuchos::RCP< const FieldPattern > &pattern) |
Add a field to the DOF manager. More... | |
void | addField (const std::string &blockId, const std::string &str, const Teuchos::RCP< const FieldPattern > &pattern) |
void | setFieldOrder (const std::vector< std::vector< std::string > > &fieldOrder) |
int | getNumFieldBlocks () const |
void | getFieldOrder (std::vector< std::vector< std::string > > &fieldOrder) const |
void | getFieldOrder (std::vector< std::string > &) const |
Teuchos::RCP< const FieldPattern > | getFieldPattern (const std::string &blockId, const std::string &fieldName) const |
Find a field pattern stored for a particular block and field number. This will retrive the pattern added with addField(blockId,fieldNum) . More... | |
int | getNumFields () const |
How many fields are handled by this manager. More... | |
Teuchos::RCP< const ConnManager > | getConnManager () const |
Teuchos::RCP< ConnManager > | getConnManager () |
virtual void | buildGlobalUnknowns () |
virtual void | buildGlobalUnknowns (const Teuchos::RCP< const FieldPattern > &geomPattern) |
virtual void | buildGlobalUnknowns (const std::vector< Teuchos::RCP< GlobalIndexer >> &fieldBlockManagers) |
void | printFieldInformation (std::ostream &os) const |
bool | validFieldOrder (const std::vector< std::vector< std::string > > &fieldOrder_ut, const std::set< std::string > &fields) const |
void | registerFields (bool buildSubUGIs) |
bool | fieldsRegistered () const |
const std::vector < Teuchos::RCP< GlobalIndexer > > & | getFieldDOFManagers () const |
int | getMaxSubFieldNumber () const |
int | getFieldBlock (int fieldNum) const |
int | getBlockGIDOffset (const std::string &elementBlock, int fieldBlock) const |
bool | getOrientationsRequired () const |
void | setOrientationsRequired (bool ro) |
void | enableTieBreak (bool useTieBreak) |
virtual int | getElementBlockGIDCount (const std::string &blockId) const |
How any GIDs are associate with a particular element block. More... | |
virtual int | getElementBlockGIDCount (const std::size_t &blockIndex) const |
How any GIDs are associate with a particular element block. 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 |
void | getElementLIDs (Kokkos::View< const int *, PHX::Device > cellIds, Kokkos::View< panzer::LocalOrdinal **, PHX::Device > lids) const |
Protected Types | |
typedef std::map < Teuchos::Tuple< int, 3 > , std::pair< std::vector< int > , std::vector< int > >, LessThan > | TupleToVectorPairMap |
Protected Member Functions | |
Teuchos::RCP< GlobalIndexer > | buildNewIndexer (const Teuchos::RCP< ConnManager > &connManager, MPI_Comm mpiComm) const |
void | setOrientationsRequired (const Teuchos::RCP< GlobalIndexer > &indexer, bool required) const |
void | buildGlobalUnknowns (const Teuchos::RCP< GlobalIndexer > &indexer, const Teuchos::RCP< const FieldPattern > &geomPattern) const |
int | getElementBlockGIDCount (const Teuchos::RCP< GlobalIndexer > &indexer, const std::string &elementBlock) const |
int | getElementBlockGIDCount (const Teuchos::RCP< GlobalIndexer > &indexer, const std::size_t &blockIndex) const |
void | printFieldInformation (const Teuchos::RCP< GlobalIndexer > &indexer, std::ostream &os) const |
void | addFieldsToFieldBlockManager (const std::vector< std::string > &activeFields, GlobalIndexer &fieldBlockManager) const |
void | addFieldsToFieldBlockManager (const std::vector< std::string > &activeFields, DOFManager &fieldBlockManager) const |
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) |
Protected Attributes | |
Teuchos::RCP< ConnManager > | connMngr_ |
std::map< std::string, int > | fieldStrToNum_ |
field string ==> field number More... | |
std::map< int, std::string > | fieldNumToStr_ |
field number ==> field string More... | |
std::map< int, int > | fieldNumToFieldBlk_ |
field number ==> field block More... | |
std::map< std::pair < std::string, std::string > , Teuchos::RCP< const FieldPattern > > | fieldStringToPattern_ |
(block ID x field string) ==> pattern More... | |
std::map< std::string, std::set< std::string > > | blockIdToFieldStrings_ |
block ID ==> field strings More... | |
std::map< std::string, std::vector< int > > | blockIdToFieldNumbers_ |
block ID ==> field numbers More... | |
std::map< std::pair < std::string, int >, int > | blockGIDOffset_ |
(element block,field block) ==> gid offset More... | |
std::vector< std::vector < std::string > > | fieldOrder_ |
bool | fieldsRegistered_ |
Teuchos::RCP< const FieldPattern > | geomPattern_ |
Teuchos::RCP< Teuchos::MpiComm < int > > | communicator_ |
std::vector< Teuchos::RCP < GlobalIndexer > > | fieldBlockManagers_ |
MPI_Comm | mpiComm_ |
int | maxSubFieldNum_ |
std::map< std::string, std::map< int, std::vector < int > > > | gidFieldOffsets_ |
std::map< std::string, TupleToVectorPairMap > | gidFieldOffsets_closure_ |
bool | requireOrientations_ |
bool | useDOFManagerFEI_ |
bool | useTieBreak_ |
Definition at line 69 of file Panzer_BlockedDOFManager.hpp.
using panzer::BlockedDOFManager::GlobalOrdinal = panzer::GlobalOrdinal |
Definition at line 72 of file Panzer_BlockedDOFManager.hpp.
using panzer::BlockedDOFManager::LocalOrdinal = panzer::LocalOrdinal |
Definition at line 73 of file Panzer_BlockedDOFManager.hpp.
using panzer::BlockedDOFManager::const_field_iterator = std::map<int,std::string>::const_iterator |
Definition at line 74 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 590 of file Panzer_BlockedDOFManager.hpp.
|
inlinevirtual |
Definition at line 76 of file Panzer_BlockedDOFManager.hpp.
panzer::BlockedDOFManager::BlockedDOFManager | ( | ) |
Definition at line 62 of file Panzer_BlockedDOFManager.cpp.
panzer::BlockedDOFManager::BlockedDOFManager | ( | const Teuchos::RCP< ConnManager > & | connMngr, |
MPI_Comm | mpiComm | ||
) |
Constructor that sets the connection manager and communicator objects. This is equivalent to calling the default constructor and then "setConnManager" routine.
Definition at line 66 of file Panzer_BlockedDOFManager.cpp.
|
inline |
Use the FEI DOF manager internally, or the standard version.
Definition at line 262 of file Panzer_BlockedDOFManager.hpp.
|
inline |
which DOF Manager is used internally?
Definition at line 267 of file Panzer_BlockedDOFManager.hpp.
void panzer::BlockedDOFManager::setConnManager | ( | const Teuchos::RCP< ConnManager > & | connMngr, |
MPI_Comm | mpiComm | ||
) |
Set the connection manager and MPI_Comm objects.
Set the connection manager and MPI_Comm objects. If this method is called more than once, the behavior is to reset the indices in the DOF manager. However, the fields will be the same (this assumes that the element blocks are consistent with the fields). The indices will need to be rebuilt by calling buildGlobalUnknowns
.
[in] | connMngr | Connection manager to use. |
[in] | mpiComm | Communicator to use. |
Definition at line 552 of file Panzer_BlockedDOFManager.cpp.
|
inline |
Get the FieldPattern describing the geometry used for this problem. If it has not been constructed then null is returned.
Definition at line 289 of file Panzer_BlockedDOFManager.hpp.
Teuchos::RCP< ConnManager > panzer::BlockedDOFManager::resetIndices | ( | ) |
Reset the indicies for this DOF manager.
This method resets the indices and wipes out internal state. This method does preserve the fields and the patterns added to the object. Also the old connection manager is returned.
Definition at line 572 of file Panzer_BlockedDOFManager.cpp.
void panzer::BlockedDOFManager::addField | ( | const std::string & | str, |
const Teuchos::RCP< const FieldPattern > & | pattern | ||
) |
Add a field to the DOF manager.
Add a field to the DOF manager. Immediately after adding the field the field number and field size will be available for a user to access
[in] | str | Human readable name of the field |
[in] | pattern | Pattern defining the basis function to be used |
addField
cannot be called after buildGlobalUnknowns
or registerFields
. Definition at line 583 of file Panzer_BlockedDOFManager.cpp.
void panzer::BlockedDOFManager::addField | ( | const std::string & | blockId, |
const std::string & | str, | ||
const Teuchos::RCP< const FieldPattern > & | pattern | ||
) |
Definition at line 594 of file Panzer_BlockedDOFManager.cpp.
void panzer::BlockedDOFManager::setFieldOrder | ( | const std::vector< std::vector< std::string > > & | fieldOrder | ) |
Set the ordering of the fields to be used internally. This controls to some extent the local ordering (on a node or edge) of the individual fields.
[in] | fieldOrder | Vector of field IDs order in the correct way |
std::map<std::string,*>
). Definition at line 906 of file Panzer_BlockedDOFManager.cpp.
int panzer::BlockedDOFManager::getNumFieldBlocks | ( | ) | const |
Return the number of field blocks associated with this manager. If the field order has not been set then this method returns 1.
Definition at line 1168 of file Panzer_BlockedDOFManager.cpp.
void panzer::BlockedDOFManager::getFieldOrder | ( | std::vector< std::vector< std::string > > & | fieldOrder | ) | const |
Get the field order used. Return the field strings.
Definition at line 913 of file Panzer_BlockedDOFManager.cpp.
|
inlinevirtual |
Get the field order used by this global indexer.
Implements panzer::GlobalIndexer.
Definition at line 337 of file Panzer_BlockedDOFManager.hpp.
Teuchos::RCP< const FieldPattern > panzer::BlockedDOFManager::getFieldPattern | ( | const std::string & | blockId, |
const std::string & | fieldName | ||
) | const |
Find a field pattern stored for a particular block and field number. This will retrive the pattern added with addField(blockId,fieldNum)
.
Find a field pattern stored for a particular block and field number. This will retrive the pattern added with addField(blockId,fieldNum)
. If no pattern is found this function returns Teuchos::null
.
[in] | blockId | Element block id |
[in] | fieldName | Field string identifier |
FieldPattern
requested if the field exists, otherwise Teuchos::null
is returned. Definition at line 1131 of file Panzer_BlockedDOFManager.cpp.
|
virtual |
How many fields are handled by this manager.
How many fields are handled by this manager.
Implements panzer::GlobalIndexer.
Definition at line 918 of file Panzer_BlockedDOFManager.cpp.
|
inlinevirtual |
Returns the connection manager current being used.
Implements panzer::GlobalIndexer.
Definition at line 365 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Returns the connection manager current being used.
Definition at line 370 of file Panzer_BlockedDOFManager.hpp.
|
virtual |
build the global unknown numberings
Definition at line 1076 of file Panzer_BlockedDOFManager.cpp.
|
virtual |
build the global unknown numberings
This method allows a different geometric field pattern to used. It does not call the ConnManger::buildConnectivity, and just uses the provided field pattern as a the geometric pattern. Note this requires that ConnManager::buildConnectivity has already been called.
Definition at line 1042 of file Panzer_BlockedDOFManager.cpp.
|
virtual |
This method simply builds the global unknowns by using the passed in global indexers. The internal connection manager must use the underlying connection manager for all the global indexers. Finally only global indexers of type DOFManager
can be used at the moment.
Definition at line 938 of file Panzer_BlockedDOFManager.cpp.
void panzer::BlockedDOFManager::printFieldInformation | ( | std::ostream & | os | ) | const |
Prints to an output stream the information about the aggregated field.
Definition at line 1102 of file Panzer_BlockedDOFManager.cpp.
bool panzer::BlockedDOFManager::validFieldOrder | ( | const std::vector< std::vector< std::string > > & | fieldOrder_ut, |
const std::set< std::string > & | fields | ||
) | const |
Check the validity of a field order. This is used internally as a sanity check. Checks for no repeats, bogus fields, and all fields being included.
[in] | fieldOrder_ut | Field order vector under test (ut). |
Definition at line 1150 of file Panzer_BlockedDOFManager.cpp.
void panzer::BlockedDOFManager::registerFields | ( | bool | buildSubUGIs | ) |
This builds all numbers for the fields as well as constructing a default field orderand validating the user specified field order.
Definition at line 605 of file Panzer_BlockedDOFManager.cpp.
|
inline |
Has the method registerFields
been called?
Definition at line 430 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Extract the field DOFManagers used underneath to define the global unknowns.
Definition at line 437 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Return the maximum field number returned by any sub DOFManager. Mostly exposed for testing purposes.
Definition at line 443 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Get field block associated with this field number.
Definition at line 450 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Get GID offset for a particular field block.
Definition at line 457 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Return if the orientations have been set to required.
Definition at line 470 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Enable computation of the orientations.
Definition at line 475 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Enable TieBreak in sub dofmanger
Definition at line 480 of file Panzer_BlockedDOFManager.hpp.
|
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::GlobalIndexer.
Definition at line 832 of file Panzer_BlockedDOFManager.cpp.
|
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::GlobalIndexer.
Definition at line 841 of file Panzer_BlockedDOFManager.cpp.
|
protected |
Build a new indexer. The concrete type is specified internally by this object (FEI version standard)
Definition at line 743 of file Panzer_BlockedDOFManager.cpp.
|
protected |
Do appropriate casting below and set orientations for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 751 of file Panzer_BlockedDOFManager.cpp.
|
protected |
Do appropriate casting below and call buildGlobalUnknowns for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 771 of file Panzer_BlockedDOFManager.cpp.
|
protected |
Do appropriate casting below and call getElementBlockGIDCount for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 810 of file Panzer_BlockedDOFManager.cpp.
|
protected |
Do appropriate casting below and call getElementBlockGIDCount for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 821 of file Panzer_BlockedDOFManager.cpp.
|
protected |
Do appropriate casting below and call printFieldInformation for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 790 of file Panzer_BlockedDOFManager.cpp.
|
protected |
This routine calls the addField
method on the fieldBlockManager adding all the fields it is supposed to control, and then calls registerFields.
This method assumes that the activeFields are a legitimate ordering for the local field block.
Definition at line 850 of file Panzer_BlockedDOFManager.cpp.
|
protected |
This routine calls the addField
method on the fieldBlockManager adding all the fields it is supposed to control, and then calls registerFields.
This method assumes that the activeFields are a legitimate ordering for the local field block.
Definition at line 874 of file Panzer_BlockedDOFManager.cpp.
|
protected |
Definition at line 541 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 571 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 573 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 575 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 576 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 578 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 580 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 581 of file Panzer_BlockedDOFManager.hpp.
|
mutableprotected |
Maps: elem block ids ==> (fieldNum ==> gidFieldOffsets vector) This uses lazy evaluation for construction.
Definition at line 586 of file Panzer_BlockedDOFManager.hpp.
|
mutableprotected |
Maps: elem block ids ==> ( (fieldNum,subcellDim,subcellId) ==> closure vector pair) This uses lazy evaluation for construction.
Definition at line 595 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 597 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 599 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 600 of file Panzer_BlockedDOFManager.hpp.