43 #ifndef PANZER_DOF_MANAGER_FACTORY_IMPL_HPP 44 #define PANZER_DOF_MANAGER_FACTORY_IMPL_HPP 55 Teuchos::RCP<panzer::GlobalIndexer>
57 const std::vector<Teuchos::RCP<panzer::PhysicsBlock> > & physicsBlocks,
58 const Teuchos::RCP<ConnManager> & connMngr,
59 const std::string & fieldOrder)
const 61 PANZER_FUNC_TIME_MONITOR_DIFF(
"panzer::DOFManagerFactory::buildUnqueGlobalIndexer",BUGI);
63 Teuchos::RCP<Teuchos::FancyOStream> pout = Teuchos::getFancyOStream(Teuchos::rcpFromRef(std::cout));
64 pout->setShowProcRank(
true);
65 pout->setOutputToRootOnly(0);
68 Teuchos::RCP<panzer::DOFManager> dofManager
75 bool orientationsRequired =
false;
77 std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator physIter;
78 for(physIter=physicsBlocks.begin();physIter!=physicsBlocks.end();++physIter) {
79 Teuchos::RCP<const panzer::PhysicsBlock> pb = *physIter;
81 const std::vector<StrPureBasisPair> & blockFields = pb->getProvidedDOFs();
84 std::set<StrPureBasisPair,StrPureBasisComp> fieldNames;
85 fieldNames.insert(blockFields.begin(),blockFields.end());
88 std::set<StrPureBasisPair,StrPureBasisComp>::const_iterator fieldItr;
89 for (fieldItr=fieldNames.begin();fieldItr!=fieldNames.end();++fieldItr) {
93 orientationsRequired |= fieldItr->second->requiresOrientations();
95 Teuchos::RCP< Intrepid2::Basis<PHX::Device::execution_space,double,double> > intrepidBasis
96 = fieldItr->second->getIntrepid2Basis();
98 dofManager->addField(pb->elementBlockID(),fieldItr->first,fp);
106 dofManager->setOrientationsRequired(orientationsRequired);
109 std::vector<std::string> fieldOrderV;
111 dofManager->setFieldOrder(fieldOrderV);
115 PANZER_FUNC_TIME_MONITOR_DIFF(
"panzer::DOFManagerFactory::buildUnqueGlobalIndexer:buildGlobalUnknowns",BGU);
116 dofManager->buildGlobalUnknowns();
135 buildFieldOrder(
const std::string & fieldOrderStr,std::vector<std::string> & fieldOrder)
139 std::stringstream ss;
149 fieldOrder.push_back(token);
static void buildFieldOrder(const std::string &fieldOrderStr, std::vector< std::string > &fieldOrder)
virtual Teuchos::RCP< panzer::GlobalIndexer > buildGlobalIndexer(const Teuchos::RCP< const Teuchos::OpaqueWrapper< MPI_Comm > > &mpiComm, const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks, const Teuchos::RCP< ConnManager > &connMngr, const std::string &fieldOrder="") const