43 #ifndef __Panzer_DOFManager_decl_hpp__
44 #define __Panzer_DOFManager_decl_hpp__
49 #include "PanzerDofMgr_config.hpp"
59 #include "Tpetra_Map.hpp"
60 #include "Tpetra_MultiVector.hpp"
65 template <
typename LocalOrdinalT,
typename GlobalOrdinalT>
66 class DOFManager :
public UniqueGlobalIndexer<LocalOrdinalT, GlobalOrdinalT> {
68 typedef GlobalOrdinalT
GO;
69 typedef LocalOrdinalT
LO;
148 const std::vector<int> &
getGIDFieldOffsets(
const std::string & blockID,
int fieldNum)
const;
151 void getElementGIDs(
LO localElementID, std::vector<GO> & gids,
const std::string & blockIdHint=
"")
const;
168 {
connMngr_->getElementBlockIds(elementBlockIds); }
188 const std::pair<std::vector<int>,std::vector<int> > &
193 {
return connMngr_->getElementBlock(blockId); }
195 void ownedIndices(
const std::vector<GlobalOrdinalT> & indices,std::vector<bool> & isOwned)
const;
197 void setFieldOrder(
const std::vector<std::string> & fieldOrder );
199 void getFieldOrder(std::vector<std::string> & fieldOrder)
const;
201 bool validFieldOrder(
const std::vector<std::string> & proposed_fieldOrder);
301 return connMngr_->getElementBlock(eBlock);
303 return connMngr_->getNeighborElementBlock(eBlock);
316 const Tpetra::Map<LO,GO,panzer::TpetraNodeType> & overlapmap,
317 const Tpetra::MultiVector<GO,LO,GO,panzer::TpetraNodeType> & overlap_mv)
const;
337 std::vector<Teuchos::RCP<panzer::FieldAggPattern> >
fa_fps_;
std::vector< std::string > fieldStringOrder_
virtual int getElementBlockGIDCount(const std::string &blockId) const
How any GIDs are associate with a particular element block.
ElementBlockAccess(bool owned, const Teuchos::RCP< const ConnManager< LO, GO > > &connMngr)
void getFieldOrder(std::vector< std::string > &fieldOrder) const
Teuchos::RCP< const panzer::FieldPattern > ga_fp_
const std::vector< int > & getBlockFieldNumbers(const std::string &blockId) const
virtual int getElementBlockGIDCount(const std::size_t &blockIndex) const
How any GIDs are associate with a particular element block.
const std::vector< int > & getGIDFieldOffsets(const std::string &blockID, int fieldNum) const
Teuchos::RCP< const FieldPattern > getGeometricFieldPattern() const
std::vector< std::vector< char > > orientation_
std::vector< Teuchos::RCP< panzer::FieldAggPattern > > fa_fps_
void setConnManager(const Teuchos::RCP< ConnManager< LO, GO > > &connMngr, MPI_Comm mpiComm)
Adds a Connection Manager that will be associated with this DOFManager.
void printFieldInformation(std::ostream &os) const
Teuchos::RCP< ConnManager< LO, GO > > connMngr_
bool requireOrientations_
void buildLocalIdsFromOwnedAndSharedElements()
void getElementOrientation(LocalOrdinalT localElmtId, std::vector< double > &gidsOrientation) const
Get a vector containg the orientation of the GIDs relative to the neighbors.
std::map< std::string, int > blockNameToID_
const std::vector< LocalOrdinalT > & getElementBlock(const std::string &blockId) const
Get the owned element block.
PHX::MDField< ScalarT > vector
virtual Teuchos::RCP< const ConnManagerBase< LocalOrdinalT > > getConnManagerBase() const
Returns the connection manager currently being used.
std::size_t getNumberElementGIDArrays() const
void ownedIndices(const std::vector< GlobalOrdinalT > &indices, std::vector< bool > &isOwned) const
Teuchos::RCP< ConnManager< LocalOrdinalT, GlobalOrdinalT > > resetIndices()
Reset the indicies for this DOF manager.
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 ad...
void getElementGIDs(LO localElementID, std::vector< GO > &gids, const std::string &blockIdHint="") const
get associated GIDs for a given local element
void setFieldOrder(const std::vector< std::string > &fieldOrder)
bool getOrientationsRequired() const
std::vector< std::vector< int > > blockToAssociatedFP_
Teuchos::RCP< const ConnManager< LO, GO > > connMngr_
int addField(const std::string &str, const Teuchos::RCP< const FieldPattern > &pattern)
Add a field to the DOF manager.
void enableGhosting(bool enable)
void buildUnknownsOrientation()
void buildGlobalUnknowns()
builds the global unknowns array
void getOwnedAndSharedIndices(std::vector< GlobalOrdinalT > &indices) const
PHX::MDField< const ScalarT, Cell, IP > field
bool validFieldOrder(const std::vector< std::string > &proposed_fieldOrder)
std::vector< int > fieldAIDOrder_
std::map< std::string, int > fieldNameToAID_
Teuchos::RCP< const Tpetra::Map< LO, GO, panzer::TpetraNodeType > > buildOverlapMapFromElements(const ElementBlockAccess &access) const
std::vector< std::vector< GO > > elementGIDs_
Teuchos::RCP< Teuchos::Comm< int > > communicator_
void setOrientationsRequired(bool ro)
std::vector< int > elementBlockGIDCount_
const std::string & getFieldString(int num) const
Reverse lookup of the field string from a field number.
std::vector< Teuchos::RCP< const FieldPattern > > fieldPatterns_
Teuchos::RCP< const Tpetra::Map< LO, GO, panzer::TpetraNodeType > > runLocalRCMReordering(const Teuchos::RCP< const Tpetra::Map< LocalOrdinalT, GlobalOrdinalT, panzer::TpetraNodeType > > &)
bool fieldInBlock(const std::string &field, const std::string &block) const
void getElementBlockIds(std::vector< std::string > &elementBlockIds) const
void getOwnedIndices(std::vector< GlobalOrdinalT > &indices) const
Teuchos::RCP< ConnManager< LO, GO > > getConnManager() const
int getNumFields() const
gets the number of fields
std::size_t blockIdToIndex(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 yo...
int getFieldNum(const std::string &string) const
Get the number used for access to this field.
bool buildConnectivityRun_
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
std::vector< std::string > blockOrder_
const std::vector< LO > & getElementBlock(const std::string &eBlock) const
Teuchos::RCP< Teuchos::Comm< int > > getComm() const
void enableTieBreak(bool enable)
std::vector< GO > owned_and_ghosted_