11 #ifndef __Panzer_BlockedDOFManager_hpp__
12 #define __Panzer_BlockedDOFManager_hpp__
21 #include "PanzerDofMgr_config.hpp"
33 #include <unordered_set>
102 virtual bool fieldInBlock(
const std::string &
field,
const std::string & block)
const;
111 virtual const std::vector<LocalOrdinal> &
getElementBlock(
const std::string & blockId)
const
121 void getElementGIDs(panzer::LocalOrdinal localElmtId,std::vector<GlobalOrdinal> & gids,
const std::string & blockIdHint=
"")
const;
136 void getElementGIDsPair(panzer::LocalOrdinal localElmtId,std::vector<std::pair<int,GlobalOrdinal>> & gids,
const std::string & blockIdHint=
"")
const;
140 virtual void getElementOrientation(panzer::LocalOrdinal localElmtId,std::vector<double> & gidsOrientation)
const;
145 virtual const std::vector<int> &
getGIDFieldOffsets(
const std::string & blockId,
int fieldNum)
const;
161 virtual const std::pair<std::vector<int>,std::vector<int> > &
170 virtual void getOwnedIndices(std::vector<GlobalOrdinal>& indices)
const;
191 void getElementGIDsAsInt(panzer::LocalOrdinal localElmtId,std::vector<int> & gids,
const std::string & blockIdHint=
"")
const;
222 virtual void ownedIndices(
const std::vector<GlobalOrdinal> & indices,std::vector<bool> & isOwned)
const;
294 void setFieldOrder(
const std::vector<std::vector<std::string> > & fieldOrder);
303 void getFieldOrder(std::vector<std::vector<std::string> > & fieldOrder)
const;
389 bool validFieldOrder(
const std::vector<std::vector<std::string> > & fieldOrder_ut,
const std::set<std::string> & fields)
const;
404 const std::vector<Teuchos::RCP<GlobalIndexer>> &
427 std::map<std::pair<std::string,int>,
int>::const_iterator itr =
470 MPI_Comm mpiComm)
const;
panzer::LocalOrdinal LocalOrdinal
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.
void setUseDOFManagerFEI(bool useFEI)
Use the FEI DOF manager internally, or the standard version.
virtual void getGhostedIndices(std::vector< GlobalOrdinal > &indices) const
Get the set of indices ghosted for this processor.
virtual const std::vector< LocalOrdinal > & getElementBlock(const std::string &blockId) const
bool requireOrientations_
void enableTieBreak(bool useTieBreak)
std::map< std::string, TupleToVectorPairMap > gidFieldOffsets_closure_
virtual ~BlockedDOFManager()
bool operator()(const Teuchos::Tuple< int, 3 > &a, const Teuchos::Tuple< int, 3 > &b) const
Teuchos::RCP< GlobalIndexer > buildNewIndexer(const Teuchos::RCP< ConnManager > &connManager, MPI_Comm mpiComm) const
void getFieldOrder(std::vector< 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 ad...
int getFieldNum(const std::string &str) const
Get the number used for access to this field.
virtual void getOwnedIndices(std::vector< GlobalOrdinal > &indices) const
Get the set of indices owned by this processor.
const std::vector< Teuchos::RCP< GlobalIndexer > > & getFieldDOFManagers() const
virtual void getElementOrientation(panzer::LocalOrdinal localElmtId, std::vector< double > &gidsOrientation) const
Get a vector containg the orientation of the GIDs relative to the neighbors.
std::vector< Teuchos::RCP< GlobalIndexer > > fieldBlockManagers_
virtual int getNumGhosted() const
Get the number of indices ghosted for this processor.
int getNumFields() const
How many fields are handled by this manager.
virtual bool fieldInBlock(const std::string &field, const std::string &block) const
Teuchos::RCP< ConnManager > getConnManager()
virtual void ownedIndices(const std::vector< GlobalOrdinal > &indices, std::vector< bool > &isOwned) const
std::map< int, std::string >::const_iterator const_field_iterator
virtual const std::vector< int > & getBlockFieldNumbers(const std::string &block) const
std::map< std::string, std::set< std::string > > blockIdToFieldStrings_
block ID ==> field strings
std::map< int, int > fieldNumToFieldBlk_
field number ==> field block
void setConnManager(const Teuchos::RCP< ConnManager > &connMngr, MPI_Comm mpiComm)
Set the connection manager and MPI_Comm objects.
bool fieldsRegistered() const
virtual void getOwnedAndGhostedIndices(std::vector< GlobalOrdinal > &indices) const
Get the set of owned and ghosted indices for this processor.
const std::string & getFieldString(int num) const
Get the string name associated with a field number.
virtual void getElementBlockIds(std::vector< std::string > &elementBlockIds) const
bool validFieldOrder(const std::vector< std::vector< std::string > > &fieldOrder_ut, const std::set< std::string > &fields) const
int getBlockGIDOffset(const std::string &elementBlock, int fieldBlock) 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.
virtual void getOwnedIndicesAsInt(std::vector< int > &indices) const
Get the set of indices owned by this processor.
std::map< std::string, std::map< int, std::vector< int > > > gidFieldOffsets_
Teuchos::RCP< const ConnManager > getConnManager() const
Teuchos::RCP< ConnManager > resetIndices()
Reset the indicies for this DOF manager.
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.
std::map< std::string, int > fieldStrToNum_
field string ==> field number
Teuchos::RCP< Teuchos::MpiComm< int > > communicator_
virtual Teuchos::RCP< Teuchos::Comm< int > > getComm() const
virtual int getNumOwned() const
Get the number of indices owned by this processor.
std::vector< std::vector< std::string > > fieldOrder_
void printFieldInformation(std::ostream &os) const
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.
virtual int getElementBlockGIDCount(const std::string &blockId) const
How any GIDs are associate with a particular element block.
virtual void getGhostedIndicesAsInt(std::vector< int > &indices) const
Get the set of indices ghosted for this processor.
virtual void buildGlobalUnknowns()
int getMaxSubFieldNumber() const
panzer::GlobalOrdinal GlobalOrdinal
Teuchos::RCP< const FieldPattern > geomPattern_
void getFieldOrder(std::vector< std::string > &) const
std::map< std::pair< std::string, int >, int > blockGIDOffset_
(element block,field block) ==> gid offset
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 yo...
void addField(const std::string &str, const Teuchos::RCP< const FieldPattern > &pattern)
Add a field to the DOF manager.
void registerFields(bool buildSubUGIs)
std::map< std::string, std::vector< int > > blockIdToFieldNumbers_
block ID ==> field numbers
bool getUseDOFManagerFEI() const
which DOF Manager is used internally?
std::map< Teuchos::Tuple< int, 3 >, std::pair< std::vector< int >, std::vector< int > >, LessThan > TupleToVectorPairMap
PHX::MDField< ScalarT, panzer::Cell, panzer::BASIS > field
A field to which we'll contribute, or in which we'll store, the result of computing this integral...
int getNumFieldBlocks() const
int getFieldBlock(int fieldNum) const
Teuchos::RCP< ConnManager > connMngr_
void setFieldOrder(const std::vector< std::vector< std::string > > &fieldOrder)
void addFieldsToFieldBlockManager(const std::vector< std::string > &activeFields, GlobalIndexer &fieldBlockManager) const
virtual int getNumOwnedAndGhosted() const
Get the number of owned and ghosted indices for this processor.
std::map< std::pair< std::string, std::string >, Teuchos::RCP< const FieldPattern > > fieldStringToPattern_
(block ID x field string) ==> pattern
const std::vector< std::pair< int, LocalOrdinal > > &pid_and_lid const
std::map< int, std::string > fieldNumToStr_
field number ==> field string
Teuchos::RCP< const FieldPattern > getGeometricFieldPattern() const
#define TEUCHOS_ASSERT(assertion_test)
bool getOrientationsRequired() const
virtual void getOwnedAndGhostedIndicesAsInt(std::vector< int > &indices) const
Get the set of owned and ghosted indices for this processor.
void setOrientationsRequired(bool ro)