11 #ifndef __Panzer_STKConnManager_hpp__
12 #define __Panzer_STKConnManager_hpp__
20 #include "Kokkos_DynRankView.hpp"
28 namespace panzer_stk {
34 typedef typename Kokkos::DynRankView<GlobalOrdinal,PHX::Device>::HostMirror
GlobalOrdinalView;
35 typedef typename Kokkos::DynRankView<LocalOrdinal, PHX::Device>::HostMirror
LocalOrdinalView;
108 {
return stkMeshDB_->getElementBlockNames(elementBlockIds); }
113 std::vector<std::string> elementBlockIds;
115 elementBlockTopologies.reserve(elementBlockIds.size());
117 for (
unsigned i=0; i<elementBlockIds.size(); ++i) {
118 elementBlockTopologies.push_back(*(
stkMeshDB_->getCellTopology(elementBlockIds[i])));
128 virtual const std::vector<LocalOrdinal> &
getElementBlock(
const std::string & blockId)
const
152 std::vector<std::size_t> & localCellIds,
153 Kokkos::DynRankView<double,PHX::Device> & points)
const;
265 {
return fp_->
equals(*entry_to_compare.first); }
void clearLocalElementMapping()
std::map< std::string, Teuchos::RCP< std::vector< LocalOrdinal > > > elementBlocks_
const GlobalOrdinalView getConnectivityView()
virtual const std::vector< LocalOrdinal > & getAssociatedNeighbors(const LocalOrdinal &el) const
virtual std::string getBlockId(LocalOrdinal localElmtId) const
static int getCachedReuseCount()
This is purely for unit testing. Returns the number of times that buildConnectivity() was called...
const LocalOrdinalView getConnectivitySizeView()
panzer::ConnManager::GlobalOrdinal GlobalOrdinal
std::size_t getOwnedElementCount() const
virtual const std::vector< LocalOrdinal > & getNeighborElementBlock(const std::string &blockId) const
std::vector< bool > sidesetYieldedAssociations_
std::map< std::string, Teuchos::RCP< std::vector< LocalOrdinal > > > neighborElementBlocks_
Teuchos::RCP< const STK_Interface > stkMeshDB_
std::pair< Teuchos::RCP< const panzer::FieldPattern >, Teuchos::RCP< panzer_stk::STKConnManager >> CachedEntry
std::map< std::string, GlobalOrdinal > blockIdToIndex_
Kokkos::DynRankView< LocalOrdinal, PHX::Device >::HostMirror LocalOrdinalView
std::vector< GlobalOrdinal > connectivity_
std::size_t ownedElementCount_
virtual bool hasAssociatedNeighbors() const
std::vector< std::string > checkAssociateElementsInSidesets(const Teuchos::Comm< int > &comm) const
const LocalOrdinalView getElementLidToConnView()
virtual std::size_t numElementBlocks() const
std::vector< std::vector< LocalOrdinal > > elmtToAssociatedElmts_
virtual ~STKConnManager()
Teuchos::RCP< const panzer::FieldPattern > fp_
bool operator()(CachedEntry &entry_to_compare) const
virtual const panzer::GlobalOrdinal * getConnectivity(LocalOrdinal localElmtId) const
void buildOffsetsAndIdCounts(const panzer::FieldPattern &fp, LocalOrdinal &nodeIdCnt, LocalOrdinal &edgeIdCnt, LocalOrdinal &faceIdCnt, LocalOrdinal &cellIdCnt, GlobalOrdinal &nodeOffset, GlobalOrdinal &edgeOffset, GlobalOrdinal &faceOffset, GlobalOrdinal &cellOffset) const
virtual void getElementBlockIds(std::vector< std::string > &elementBlockIds) const
virtual Teuchos::RCP< panzer::ConnManager > noConnectivityClone() const
static std::vector< CachedEntry > cached_conn_managers_
FieldPatternCompare(const Teuchos::RCP< const panzer::FieldPattern > &fp)
void modifySubcellConnectivities(const panzer::FieldPattern &fp, stk::mesh::Entity element, unsigned subcellRank, unsigned subcellId, GlobalOrdinal newId, GlobalOrdinal offset)
void applyPeriodicBCs(const panzer::FieldPattern &fp, GlobalOrdinal nodeOffset, GlobalOrdinal edgeOffset, GlobalOrdinal faceOffset, GlobalOrdinal cellOffset)
panzer::ConnManager::LocalOrdinal LocalOrdinal
panzer::GlobalOrdinal GlobalOrdinal
virtual const std::vector< LocalOrdinal > & getElementBlock(const std::string &blockId) const
Pure virtual base class for supplying mesh connectivity information to the DOF Manager.
virtual LocalOrdinal getConnectivitySize(LocalOrdinal localElmtId) const
static void cacheConnectivity()
Enables the caching of connectivity data. Be sure to call clearCachedConnectivityData() before exitin...
LocalOrdinal addSubcellConnectivities(stk::mesh::Entity element, unsigned subcellRank, LocalOrdinal idCnt, GlobalOrdinal offset, const unsigned maxIds=0)
Loops over relations of a given rank for a specified element and adds a unique ID to the connectivity...
virtual void getDofCoords(const std::string &blockId, const panzer::Intrepid2FieldPattern &coordProvider, std::vector< std::size_t > &localCellIds, Kokkos::DynRankView< double, PHX::Device > &points) const
Teuchos::RCP< const STK_Interface > getSTKInterface() const
virtual panzer::GlobalOrdinal * getConnectivity(LocalOrdinal localElmtId)
static void clearCachedConnectivityData()
If you enable caching with cacheConnectivity(), this must be called prior to exiting the code...
void buildLocalElementMapping()
std::vector< LocalOrdinal > elmtLidToConn_
virtual void getElementBlockTopologies(std::vector< shards::CellTopology > &elementBlockTopologies) const
std::vector< std::string > sidesetsToAssociate_
virtual bool equals(const FieldPattern &fp) const
static int cached_reuse_count_
Kokkos::DynRankView< GlobalOrdinal, PHX::Device >::HostMirror GlobalOrdinalView
static bool cache_connectivity_
void applyInterfaceConditions()
Teuchos::RCP< std::vector< stk::mesh::Entity > > elements_
virtual void buildConnectivity(const panzer::FieldPattern &fp)
STKConnManager(const Teuchos::RCP< const STK_Interface > &stkMeshDB)
void associateElementsInSideset(const std::string sideset_id)
std::vector< LocalOrdinal > connSize_