Panzer
Version of the Day
|
#include <Panzer_GatherSolution_BlockedTpetra.hpp>
Classes | |
struct | LessThan |
Public Types | |
typedef std::pair< int, GlobalOrdinalT > | GlobalOrdinal |
typedef LocalOrdinalT | LocalOrdinal |
typedef std::map< int, std::string >::const_iterator | const_field_iterator |
Public Member Functions | |
virtual | ~BlockedDOFManager () |
BlockedDOFManager () | |
BlockedDOFManager (const Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > &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 (LocalOrdinalT 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... | |
virtual void | getElementOrientation (LocalOrdinalT 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 |
virtual void | getOwnedAndGhostedIndices (std::vector< GlobalOrdinal > &indices) const |
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< LocalOrdinalT, GlobalOrdinalT > > &connMngr, MPI_Comm mpiComm) |
Set the connection manager and MPI_Comm objects. More... | |
Teuchos::RCP< const FieldPattern > | getGeometricFieldPattern () const |
Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > | 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 > &fieldOrder) 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< LocalOrdinalT, GlobalOrdinalT > > | getConnManager () const |
Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > | getConnManager () |
virtual Teuchos::RCP< const ConnManagerBase< LocalOrdinalT > > | getConnManagerBase () const |
Returns the connection manager currently being used. More... | |
virtual void | buildGlobalUnknowns () |
virtual void | buildGlobalUnknowns (const Teuchos::RCP< const FieldPattern > &geomPattern) |
virtual void | buildGlobalUnknowns (const std::vector< Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > > &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< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > > & | 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... | |
![]() | |
virtual | ~UniqueGlobalIndexer ()=0 |
Pure virtual destructor: prevents warnings with inline empty implementation. More... | |
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 | ~UniqueGlobalIndexerBase ()=0 |
Pure virtual destructor: prevents warnings with inline empty implementation. More... | |
Protected Types | |
typedef std::map< Teuchos::Tuple< int, 3 >, std::pair< std::vector< int >, std::vector< int > >, LessThan > | TupleToVectorPairMap |
Protected Member Functions | |
Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > | buildNewIndexer (const Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > &connManager, MPI_Comm mpiComm) const |
void | setOrientationsRequired (const Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > &indexer, bool required) const |
void | buildGlobalUnknowns (const Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > &indexer, const Teuchos::RCP< const FieldPattern > &geomPattern) const |
int | getElementBlockGIDCount (const Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > &indexer, const std::string &elementBlock) const |
int | getElementBlockGIDCount (const Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > &indexer, const std::size_t &blockIndex) const |
void | printFieldInformation (const Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > &indexer, std::ostream &os) const |
void | addFieldsToFieldBlockManager (const std::vector< std::string > &activeFields, UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > &fieldBlockManager) const |
void | addFieldsToFieldBlockManager (const std::vector< std::string > &activeFields, DOFManager< LocalOrdinalT, GlobalOrdinalT > &fieldBlockManager) const |
![]() | |
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, std::pair< int, GlobalOrdinalT > > &src) |
Protected Attributes | |
Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > | 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::unordered_set< GlobalOrdinal, panzer::pair_hash > | ownedGIDHashTable_ |
std::vector< std::vector< std::string > > | fieldOrder_ |
bool | fieldsRegistered_ |
Teuchos::RCP< const FieldPattern > | geomPattern_ |
Teuchos::RCP< Teuchos::MpiComm< int > > | communicator_ |
std::vector< Teuchos::RCP< UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > > > | 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 71 of file Panzer_GatherSolution_BlockedTpetra.hpp.
typedef std::pair<int,GlobalOrdinalT> panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::GlobalOrdinal |
Definition at line 71 of file Panzer_BlockedDOFManager.hpp.
typedef LocalOrdinalT panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::LocalOrdinal |
Definition at line 72 of file Panzer_BlockedDOFManager.hpp.
typedef std::map<int,std::string>::const_iterator panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::const_field_iterator |
Definition at line 73 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 544 of file Panzer_BlockedDOFManager.hpp.
|
inlinevirtual |
Definition at line 75 of file Panzer_BlockedDOFManager.hpp.
panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::BlockedDOFManager | ( | ) |
Definition at line 62 of file Panzer_BlockedDOFManager_impl.hpp.
panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::BlockedDOFManager | ( | const Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > & | 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 67 of file Panzer_BlockedDOFManager_impl.hpp.
|
inline |
Use the FEI DOF manager internally, or the standard version.
Definition at line 198 of file Panzer_BlockedDOFManager.hpp.
|
inline |
which DOF Manager is used internally?
Definition at line 203 of file Panzer_BlockedDOFManager.hpp.
void panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::setConnManager | ( | const Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > & | 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 388 of file Panzer_BlockedDOFManager_impl.hpp.
|
inline |
Get the FieldPattern describing the geometry used for this problem. If it has not been constructed then null is returned.
Definition at line 229 of file Panzer_BlockedDOFManager.hpp.
Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::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 409 of file Panzer_BlockedDOFManager_impl.hpp.
void panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::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 430 of file Panzer_BlockedDOFManager_impl.hpp.
void panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::addField | ( | const std::string & | blockId, |
const std::string & | str, | ||
const Teuchos::RCP< const FieldPattern > & | pattern | ||
) |
Definition at line 442 of file Panzer_BlockedDOFManager_impl.hpp.
void panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::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 877 of file Panzer_BlockedDOFManager_impl.hpp.
int panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::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 1149 of file Panzer_BlockedDOFManager_impl.hpp.
void panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::getFieldOrder | ( | std::vector< std::vector< std::string > > & | fieldOrder | ) | const |
Get the field order used. Return the field strings.
Definition at line 885 of file Panzer_BlockedDOFManager_impl.hpp.
|
inlinevirtual |
Get the field order used by this global indexer.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, std::pair< int, GlobalOrdinalT > >.
Definition at line 277 of file Panzer_BlockedDOFManager.hpp.
Teuchos::RCP< const FieldPattern > panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::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 1110 of file Panzer_BlockedDOFManager_impl.hpp.
|
virtual |
How many fields are handled by this manager.
How many fields are handled by this manager.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, std::pair< int, GlobalOrdinalT > >.
Definition at line 891 of file Panzer_BlockedDOFManager_impl.hpp.
|
inline |
Returns the connection manager current being used.
Definition at line 305 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Returns the connection manager current being used.
Definition at line 310 of file Panzer_BlockedDOFManager.hpp.
|
inlinevirtual |
Returns the connection manager currently being used.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, std::pair< int, GlobalOrdinalT > >.
Definition at line 313 of file Panzer_BlockedDOFManager.hpp.
|
virtual |
build the global unknown numberings
Definition at line 1054 of file Panzer_BlockedDOFManager_impl.hpp.
|
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 1019 of file Panzer_BlockedDOFManager_impl.hpp.
|
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 911 of file Panzer_BlockedDOFManager_impl.hpp.
void panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::printFieldInformation | ( | std::ostream & | os | ) | const |
Prints to an output stream the information about the aggregated field.
Definition at line 1080 of file Panzer_BlockedDOFManager_impl.hpp.
bool panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::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 1130 of file Panzer_BlockedDOFManager_impl.hpp.
void panzer::BlockedDOFManager< LocalOrdinalT, GlobalOrdinalT >::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 454 of file Panzer_BlockedDOFManager_impl.hpp.
|
inline |
Has the method registerFields
been called?
Definition at line 373 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Extract the field DOFManagers used underneath to define the global unknowns.
Definition at line 380 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Return the maximum field number returned by any sub DOFManager. Mostly exposed for testing purposes.
Definition at line 386 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Get field block associated with this field number.
Definition at line 393 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Get GID offset for a particular field block.
Definition at line 400 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Return if the orientations have been set to required.
Definition at line 413 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Enable computation of the orientations.
Definition at line 418 of file Panzer_BlockedDOFManager.hpp.
|
inline |
Enable TieBreak in sub dofmanger
Definition at line 423 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::UniqueGlobalIndexer< LocalOrdinalT, std::pair< int, GlobalOrdinalT > >.
Definition at line 746 of file Panzer_BlockedDOFManager_impl.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::UniqueGlobalIndexer< LocalOrdinalT, std::pair< int, GlobalOrdinalT > >.
Definition at line 757 of file Panzer_BlockedDOFManager_impl.hpp.
|
protected |
Build a new indexer. The concrete type is specified internally by this object (FEI version standard)
Definition at line 594 of file Panzer_BlockedDOFManager_impl.hpp.
|
protected |
Do appropriate casting below and set orientations for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 623 of file Panzer_BlockedDOFManager_impl.hpp.
|
protected |
Do appropriate casting below and call buildGlobalUnknowns for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 656 of file Panzer_BlockedDOFManager_impl.hpp.
|
protected |
Do appropriate casting below and call getElementBlockGIDCount for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 722 of file Panzer_BlockedDOFManager_impl.hpp.
|
protected |
Do appropriate casting below and call getElementBlockGIDCount for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 734 of file Panzer_BlockedDOFManager_impl.hpp.
|
protected |
Do appropriate casting below and call printFieldInformation for a particular indexer. (handles FEI versus standard DOFManager)
Definition at line 689 of file Panzer_BlockedDOFManager_impl.hpp.
|
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 768 of file Panzer_BlockedDOFManager_impl.hpp.
|
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 844 of file Panzer_BlockedDOFManager_impl.hpp.
|
protected |
Definition at line 495 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 523 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 525 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 527 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 529 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 530 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 532 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 534 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 535 of file Panzer_BlockedDOFManager.hpp.
|
mutableprotected |
Maps: elem block ids ==> (fieldNum ==> gidFieldOffsets vector) This uses lazy evaluation for construction.
Definition at line 540 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 549 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 551 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 553 of file Panzer_BlockedDOFManager.hpp.
|
protected |
Definition at line 554 of file Panzer_BlockedDOFManager.hpp.