Panzer
Version of the Day
|
#include <Panzer_L2Projection.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, const panzer::FieldType &type=panzer::FieldType::CG) |
Add a field to the DOF manager. More... | |
int | addField (const std::string &blockID, const std::string &str, const Teuchos::RCP< const FieldPattern > &pattern, const panzer::FieldType &type=panzer::FieldType::CG) |
Add 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 |
Get the set of indices owned by this processor. More... | |
void | getGhostedIndices (std::vector< GlobalOrdinalT > &indices) const |
Get the set of indices ghosted for this processor. More... | |
void | getOwnedAndGhostedIndices (std::vector< GlobalOrdinalT > &indices) const |
Get the set of owned and ghosted indices for this processor. More... | |
int | getNumOwned () const |
Get the number of indices owned by this processor. More... | |
int | getNumGhosted () const |
Get the number of indices ghosted for this processor. More... | |
int | getNumOwnedAndGhosted () const |
Get the number of owned and ghosted indices for this processor. More... | |
int | getNumFields () const |
gets the number of fields More... | |
const std::vector< int > & | getGIDFieldOffsets (const std::string &blockID, int fieldNum) const |
const Kokkos::View< const int *, PHX::Device > | getGIDFieldOffsetsKokkos (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 |
Public Member Functions inherited from panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT > | |
virtual | ~UniqueGlobalIndexer ()=0 |
Pure virtual destructor: prevents warnings with inline empty implementation. More... | |
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 |
Public Member Functions inherited from panzer::UniqueGlobalIndexerBase | |
virtual | ~UniqueGlobalIndexerBase ()=0 |
Pure virtual destructor: prevents warnings with inline empty implementation. More... | |
Protected Attributes | |
Teuchos::RCP< ConnManager< LO, GO > > | connMngr_ |
Teuchos::RCP< Teuchos::Comm < int > > | communicator_ |
std::vector< Teuchos::RCP < const FieldPattern > > | fieldPatterns_ |
std::vector< FieldType > | fieldTypes_ |
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 < signed char > > | orientation_ |
bool | useTieBreak_ |
bool | useNeighbors_ |
Definition at line 27 of file Panzer_L2Projection.hpp.
typedef GlobalOrdinalT panzer::DOFManager< LO, GO >::GO |
Definition at line 70 of file Panzer_DOFManager.hpp.
typedef LocalOrdinalT panzer::DOFManager< LO, GO >::LO |
Definition at line 71 of file Panzer_DOFManager.hpp.
|
inlinevirtual |
Definition at line 73 of file Panzer_DOFManager.hpp.
panzer::DOFManager< LO, GO >::DOFManager | ( | ) |
Definition at line 148 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 153 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 160 of file Panzer_DOFManager_impl.hpp.
|
inline |
Definition at line 86 of file Panzer_DOFManager.hpp.
|
inlinevirtual |
Returns the connection manager currently being used.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 89 of file Panzer_DOFManager.hpp.
int panzer::DOFManager< LO, GO >::addField | ( | const std::string & | str, |
const Teuchos::RCP< const FieldPattern > & | pattern, | ||
const panzer::FieldType & | type = panzer::FieldType::CG |
||
) |
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 |
[in] | type | Type of the Field (CG/DG) for generating GIDs |
addField
cannot be called after buildGlobalUnknowns
or registerFields
. Definition at line 180 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, | ||
const panzer::FieldType & | type = panzer::FieldType::CG |
||
) |
Add a field with an option for specifying the block.
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] | blockID | Name of the element block that this field should be added to |
[in] | str | Human readable name of the field |
[in] | pattern | Pattern defining the basis function to be used |
[in] | type | Type of the Field (CG/DG) for generating GIDs |
addField
cannot be called after buildGlobalUnknowns
or registerFields
. Definition at line 204 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 254 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 268 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the set of indices owned by this processor.
[out] | indices | A vector that will be fille with the indices owned by this processor. |
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 305 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the set of indices ghosted for this processor.
[out] | indices | A vector that will be fille with the indices ghosted for this processor. |
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 319 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the set of owned and ghosted indices for this processor.
[out] | indices | A vector that will be fille with the owned and ghosted indices for this processor. |
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 333 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the number of indices owned by this processor.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 352 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the number of indices ghosted for this processor.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 365 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the number of owned and ghosted indices for this processor.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 378 of file Panzer_DOFManager_impl.hpp.
|
virtual |
gets the number of fields
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 385 of file Panzer_DOFManager_impl.hpp.
|
virtual |
gets the field pattern so you can find a particular field in the GIDs array.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 391 of file Panzer_DOFManager_impl.hpp.
const Kokkos::View< const int *, PHX::Device > panzer::DOFManager< LO, GO >::getGIDFieldOffsetsKokkos | ( | const std::string & | blockID, |
int | fieldNum | ||
) | const |
gets the field pattern so you can find a particular field in the GIDs array.
Definition at line 408 of file Panzer_DOFManager_impl.hpp.
|
virtual |
get associated GIDs for a given local element
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 424 of file Panzer_DOFManager_impl.hpp.
void panzer::DOFManager< LocalOrdinalT, GlobalOrdinalT >::buildGlobalUnknowns | ( | ) |
builds the global unknowns array
Definition at line 430 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 455 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 984 of file Panzer_DOFManager_impl.hpp.
|
inlinevirtual |
Get communicator associated with this global indexer.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 234 of file Panzer_DOFManager.hpp.
|
inline |
Definition at line 237 of file Panzer_DOFManager.hpp.
|
inlinevirtual |
What are the blockIds included in this connection manager?
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 240 of file Panzer_DOFManager.hpp.
|
virtual |
Is the specified field in the element block?
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 1011 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get field numbers associated with a particular element block.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 1040 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 1060 of file Panzer_DOFManager_impl.hpp.
|
inlinevirtual |
Get the owned element block.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 265 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 1076 of file Panzer_DOFManager_impl.hpp.
void panzer::DOFManager< LO, GO >::setFieldOrder | ( | const std::vector< std::string > & | fieldOrder | ) |
Definition at line 1088 of file Panzer_DOFManager_impl.hpp.
|
virtual |
Get the field order used by this global indexer.
Implements panzer::UniqueGlobalIndexer< LocalOrdinalT, GlobalOrdinalT >.
Definition at line 1003 of file Panzer_DOFManager_impl.hpp.
bool panzer::DOFManager< LO, GO >::validFieldOrder | ( | const std::vector< std::string > & | proposed_fieldOrder | ) |
Definition at line 1107 of file Panzer_DOFManager_impl.hpp.
void panzer::DOFManager< LO, GO >::buildUnknownsOrientation | ( | ) |
Definition at line 1140 of file Panzer_DOFManager_impl.hpp.
|
inline |
Definition at line 279 of file Panzer_DOFManager.hpp.
|
inline |
Definition at line 282 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 1211 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 1126 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 1224 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 306 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 314 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 1251 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 326 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 334 of file Panzer_DOFManager.hpp.
|
inline |
Definition at line 343 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 1242 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 1271 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 868 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 703 of file Panzer_DOFManager_impl.hpp.
|
protected |
Definition at line 1304 of file Panzer_DOFManager_impl.hpp.
|
protected |
Definition at line 1364 of file Panzer_DOFManager_impl.hpp.
|
protected |
Definition at line 408 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 409 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 413 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 414 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 415 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 417 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 418 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 419 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 421 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 422 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 425 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 426 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 428 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 429 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 432 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 436 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 438 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 440 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 442 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 443 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 445 of file Panzer_DOFManager.hpp.
|
protected |
Definition at line 446 of file Panzer_DOFManager.hpp.