Panzer
Version of the Day
|
#include <Panzer_FieldManagerBuilder.hpp>
Classes | |
class | ElementBlockAccess |
Public Types | |
typedef GlobalOrdinalT | GO |
typedef LocalOrdinalT | LO |
Public Member Functions | |
virtual | ~DOFManager () |
DOFManager () | |
DOFManager (const Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > &connMngr, MPI_Comm mpiComm) | |
void | setConnManager (const Teuchos::RCP< ConnManager< LO, GO > > &connMngr, MPI_Comm mpiComm) |
Adds a Connection Manager that will be associated with this DOFManager. More... | |
Teuchos::RCP< ConnManager< LO, GO > > | getConnManager () const |
virtual Teuchos::RCP< const ConnManagerBase< LocalOrdinalT > > | getConnManagerBase () const |
Returns the connection manager currently being used. More... | |
int | addField (const std::string &str, const Teuchos::RCP< const FieldPattern > &pattern) |
Add a field to the DOF manager. More... | |
int | addField (const std::string &blockID, const std::string &str, const Teuchos::RCP< const FieldPattern > &pattern) |
Adds a field with an option for specifying the block. More... | |
Teuchos::RCP< const FieldPattern > | getFieldPattern (const std::string &name) const |
Find a field pattern stored for a particular block and field number. This will retrive the pattern added with addField(blockId,fieldNum) . More... | |
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... | |
void | getOwnedIndices (std::vector< GlobalOrdinalT > &indices) const |
void | getOwnedAndGhostedIndices (std::vector< GlobalOrdinalT > &indices) const |
int | getNumFields () const |
gets the number of fields More... | |
const std::vector< int > & | getGIDFieldOffsets (const std::string &blockID, int fieldNum) const |
void | getElementGIDs (LO localElementID, std::vector< GO > &gids, const std::string &blockIdHint="") const |
get associated GIDs for a given local element More... | |
void | buildGlobalUnknowns () |
builds the global unknowns array More... | |
void | buildGlobalUnknowns (const Teuchos::RCP< const FieldPattern > &geomPattern) |
builds the global unknowns array More... | |
int | getFieldNum (const std::string &string) const |
Get the number used for access to this field. More... | |
Teuchos::RCP< Teuchos::Comm< int > > | getComm () const |
Teuchos::RCP< const FieldPattern > | getGeometricFieldPattern () const |
void | getElementBlockIds (std::vector< std::string > &elementBlockIds) const |
bool | fieldInBlock (const std::string &field, const std::string &block) const |
const std::vector< int > & | getBlockFieldNumbers (const std::string &blockId) const |
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... | |
const std::vector< LocalOrdinalT > & | getElementBlock (const std::string &blockId) const |
Get the owned element block. More... | |
void | ownedIndices (const std::vector< GlobalOrdinalT > &indices, std::vector< bool > &isOwned) const |
void | setFieldOrder (const std::vector< std::string > &fieldOrder) |
void | getFieldOrder (std::vector< std::string > &fieldOrder) const |
bool | validFieldOrder (const std::vector< std::string > &proposed_fieldOrder) |
void | buildUnknownsOrientation () |
bool | getOrientationsRequired () const |
void | setOrientationsRequired (bool ro) |
void | getElementOrientation (LocalOrdinalT localElmtId, std::vector< double > &gidsOrientation) const |
Get a vector containg the orientation of the GIDs relative to the neighbors. More... | |
const std::string & | getFieldString (int num) const |
Reverse lookup of the field string from a field number. More... | |
Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > | resetIndices () |
Reset the indices for this DOF manager. More... | |
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... | |
void | printFieldInformation (std::ostream &os) const |
void | enableTieBreak (bool enable) |
void | useNeighbors (bool flag) |
std::size_t | getNumberElementGIDArrays () const |
![]() | |
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 Member Functions | |
Teuchos::RCP< const Tpetra::Map< LO, GO, panzer::TpetraNodeType > > | runLocalRCMReordering (const Teuchos::RCP< const Tpetra::Map< LocalOrdinalT, GlobalOrdinalT, panzer::TpetraNodeType > > &) |
std::size_t | blockIdToIndex (const std::string &blockId) const |
Teuchos::RCP< const Tpetra::Map< LO, GO, panzer::TpetraNodeType > > | buildOverlapMapFromElements (const ElementBlockAccess &access) const |
Teuchos::RCP< Tpetra::MultiVector< GO, LO, GO, panzer::TpetraNodeType > > | buildTaggedMultiVector (const ElementBlockAccess &access) |
std::pair< Teuchos::RCP< Tpetra::MultiVector< GO, LO, GO, panzer::TpetraNodeType > >, Teuchos::RCP< Tpetra::MultiVector< GO, LO, GO, panzer::TpetraNodeType > > > | buildGlobalUnknowns_GUN (const Tpetra::MultiVector< GO, LO, GO, panzer::TpetraNodeType > &tagged_overlap_mv, Tpetra::MultiVector< GO, LO, GO, panzer::TpetraNodeType > &overlap_mv) const |
void | fillGIDsFromOverlappedMV (const ElementBlockAccess &access, std::vector< std::vector< GO > > &elementGIDs, const Tpetra::Map< LO, GO, panzer::TpetraNodeType > &overlapmap, const Tpetra::MultiVector< GO, LO, GO, panzer::TpetraNodeType > &overlap_mv) const |
void | buildLocalIdsFromOwnedAndGhostedElements () |
![]() | |
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) |
Protected Attributes | |
Teuchos::RCP< ConnManager< LO, GO > > | connMngr_ |
Teuchos::RCP< Teuchos::Comm< int > > | communicator_ |
std::vector< Teuchos::RCP< const FieldPattern > > | fieldPatterns_ |
std::map< std::string, int > | fieldNameToAID_ |
std::vector< std::string > | blockOrder_ |
std::map< std::string, int > | blockNameToID_ |
std::vector< std::vector< int > > | blockToAssociatedFP_ |
std::vector< std::string > | fieldStringOrder_ |
std::vector< int > | fieldAIDOrder_ |
Teuchos::RCP< const panzer::FieldPattern > | ga_fp_ |
std::vector< Teuchos::RCP< panzer::FieldAggPattern > > | fa_fps_ |
std::vector< GO > | owned_ |
std::vector< GO > | ghosted_ |
std::vector< std::vector< GO > > | elementGIDs_ |
std::vector< int > | elementBlockGIDCount_ |
int | numFields_ |
bool | buildConnectivityRun_ |
bool | requireOrientations_ |
std::vector< std::vector< char > > | orientation_ |
bool | useTieBreak_ |
bool | useNeighbors_ |
Definition at line 60 of file Panzer_FieldManagerBuilder.hpp.
typedef GlobalOrdinalT panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >::GO |
Definition at line 68 of file Panzer_DOFManager.hpp.
typedef LocalOrdinalT panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >::LO |
Definition at line 69 of file Panzer_DOFManager.hpp.
|
inlinevirtual |
Definition at line 71 of file Panzer_DOFManager.hpp.
panzer::DOFManager< LO, GO >::DOFManager | ( | ) |
Definition at line 118 of file Panzer_DOFManager_impl.hpp.
panzer::DOFManager< LO, GO >::DOFManager | ( | 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 123 of file Panzer_DOFManager_impl.hpp.
void panzer::DOFManager< LO, GO >::setConnManager | ( | const Teuchos::RCP< ConnManager< LO, GO > > & | connMngr, |
MPI_Comm | mpiComm | ||
) |
Adds a Connection Manager that will be associated with this DOFManager.
Definition at line 130 of file Panzer_DOFManager_impl.hpp.
|
inline |
Definition at line 84 of file Panzer_DOFManager.hpp.
|
inlinevirtual |
Returns the connection manager currently being used.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 87 of file Panzer_DOFManager.hpp.
int panzer::DOFManager< LO, GO >::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 150 of file Panzer_DOFManager_impl.hpp.
int panzer::DOFManager< LO, GO >::addField | ( | const std::string & | blockID, |
const std::string & | str, | ||
const Teuchos::RCP< const FieldPattern > & | pattern | ||
) |
Adds a field with an option for specifying the block.
Definition at line 172 of file Panzer_DOFManager_impl.hpp.
Teuchos::RCP< const FieldPattern > panzer::DOFManager< LO, GO >::getFieldPattern | ( | const std::string & | name | ) | 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] | fieldNum | Field integer identifier |
FieldPattern
requested if the field exists, otherwise Teuchos::null
is returned. Definition at line 220 of file Panzer_DOFManager_impl.hpp.
Teuchos::RCP< const FieldPattern > panzer::DOFManager< LO, GO >::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 234 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get set of indices owned by this processor
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 264 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the set of owned and ghosted indices for this processor.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 270 of file Panzer_DOFManager_impl.hpp.
|
virtual |
gets the number of fields
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 282 of file Panzer_DOFManager_impl.hpp.
|
virtual |
gets the field pattern so you can find a particular field in the GIDs aray.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 288 of file Panzer_DOFManager_impl.hpp.
|
virtual |
get associated GIDs for a given local element
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 304 of file Panzer_DOFManager_impl.hpp.
void panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >::buildGlobalUnknowns | ( | ) |
builds the global unknowns array
Definition at line 310 of file Panzer_DOFManager_impl.hpp.
void panzer::DOFManager< LO, GO >::buildGlobalUnknowns | ( | const Teuchos::RCP< const FieldPattern > & | geomPattern | ) |
builds the global unknowns array
Definition at line 329 of file Panzer_DOFManager_impl.hpp.
|
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.
[in] | str | Human readable name of the field |
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 849 of file Panzer_DOFManager_impl.hpp.
|
inlinevirtual |
Get communicator associated with this global indexer.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 160 of file Panzer_DOFManager.hpp.
|
inline |
Definition at line 163 of file Panzer_DOFManager.hpp.
|
inlinevirtual |
What are the blockIds included in this connection manager?
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 166 of file Panzer_DOFManager.hpp.
|
virtual |
Is the specified field in the element block?
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 876 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get field numbers associated with a particular element block.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 905 of file Panzer_DOFManager_impl.hpp.
|
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.
[in] | blockId | |
[in] | fieldNum | |
[in] | subcellDim | |
[in] | subcellId |
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 925 of file Panzer_DOFManager_impl.hpp.
|
inlinevirtual |
Get the owned element block.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 191 of file Panzer_DOFManager.hpp.
|
virtual |
Get a yes/no on ownership for each index in a vector
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 941 of file Panzer_DOFManager_impl.hpp.
void panzer::DOFManager< LO, GO >::setFieldOrder | ( | const std::vector< std::string > & | fieldOrder | ) |
Definition at line 953 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the field order used by this global indexer.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 868 of file Panzer_DOFManager_impl.hpp.
bool panzer::DOFManager< LO, GO >::validFieldOrder | ( | const std::vector< std::string > & | proposed_fieldOrder | ) |
Definition at line 972 of file Panzer_DOFManager_impl.hpp.
void panzer::DOFManager< LO, GO >::buildUnknownsOrientation | ( | ) |
Definition at line 1005 of file Panzer_DOFManager_impl.hpp.
|
inline |
Definition at line 205 of file Panzer_DOFManager.hpp.
|
inline |
Definition at line 208 of file Panzer_DOFManager.hpp.
|
virtual |
Get a vector containg the orientation of the GIDs relative to the neighbors.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 1076 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Reverse lookup of the field string from a field number.
[in] | num | Field number. Assumed to be a valid field number. Computed from getFieldNum . |
Implements panzer::UniqueGlobalIndexerBase.
Definition at line 991 of file Panzer_DOFManager_impl.hpp.
Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >::resetIndices | ( | ) |
Reset the indices 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 1089 of file Panzer_DOFManager_impl.hpp.
|
inlinevirtual |
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, GlobalOrdinalT >.
Definition at line 232 of file Panzer_DOFManager.hpp.
|
inlinevirtual |
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, GlobalOrdinalT >.
Definition at line 240 of file Panzer_DOFManager.hpp.
void panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >::printFieldInformation | ( | std::ostream & | os | ) | const |
Prints to an output stream the information about the aggregated field.
Definition at line 1116 of file Panzer_DOFManager_impl.hpp.
|
inline |
Turn on/off the use of a tie break object in the createOneToOne algorithm. Turning this one gives better load balancing.
Definition at line 252 of file Panzer_DOFManager.hpp.
|
inline |
Turn on/off the use of neighbor elements in the construction of the global ids. If on, then the ghosted GIDs will include GIDs from neighbor elements, and you will be able to call getElement(G/L)IDs for elements in the one ring of this processor.
Definition at line 260 of file Panzer_DOFManager.hpp.
|
inline |
Definition at line 269 of file Panzer_DOFManager.hpp.
|
protected |
Use Zoltan2 to locally reorder with RCM.
|
protected |
Using the natural ordering associated with the std::vector retrieved from the connection manager
Definition at line 1107 of file Panzer_DOFManager_impl.hpp.
|
protected |
Build the overlapped communication map given an element access object. This map is used to construct the GIDs, and also to communicate the used GIDs. (this is steps 1 and 2)
Definition at line 1136 of file Panzer_DOFManager_impl.hpp.
|
protected |
Build a tagged multivector (as defined in GUN paper) to use in global unknown numbering algorithm. Note that this is non-const. It does modify the elementBlockGIDCount
member variable.
Definition at line 740 of file Panzer_DOFManager_impl.hpp.
|
protected |
Build global unknowns using the algorithm in the Global Unknowns Numbering paper (GUN). This
returns a non-overlapped multi-vector with the unique global IDs as owned by this processor. The input tagged overlapped multi-vector (overlap_mv
) is overwritten with the global IDs. Note fields on geometric entities that are not assigned a global ID are given an entry of -1.
Definition at line 573 of file Panzer_DOFManager_impl.hpp.
|
protected |
Definition at line 1169 of file Panzer_DOFManager_impl.hpp.
|
protected |
Definition at line 1226 of file Panzer_DOFManager_impl.hpp.
|
protected |
Definition at line 334 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 335 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 339 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 340 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 342 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 343 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 344 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 346 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 347 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 350 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 351 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 353 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 354 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 357 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 361 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 363 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 365 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 367 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 368 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 370 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 371 of file Panzer_DOFManager.hpp.