43 #ifndef PANZER_BlockedDOF_MANAGER_FACTORY_IMPL_HPP
44 #define PANZER_BlockedDOF_MANAGER_FACTORY_IMPL_HPP
54 template <
typename LO,
typename GO>
58 std::vector<std::string> tokens;
67 if(tokens[0]!=
"blocked:")
71 bool acceptsHyphen =
false;
72 for(std::size_t i=1;i<tokens.size();i++) {
76 "Blocked assembly: Error \"Field Order\" hyphen error at "
79 if(acceptsHyphen && tokens[i]==
"-")
80 acceptsHyphen =
false;
89 template <
typename LO,
typename GO>
91 buildBlocking(
const std::string & fieldOrder,std::vector<std::vector<std::string> > & blocks)
96 std::vector<std::string> tokens;
102 for(std::size_t i=1;i<tokens.size();i++) {
104 if(tokens[i]!=
"-" && tokens[i-1]!=
"-") {
106 if(current!=Teuchos::null)
107 blocks.push_back(*current);
113 current->push_back(tokens[i]);
116 if(current!=Teuchos::null)
117 blocks.push_back(*current);
120 template <
typename LO,
typename GO>
125 const std::string & fieldOrder)
const
136 dofManager->enableTieBreak(useTieBreak_);
137 dofManager->setUseDOFManagerFEI(useDOFManagerFEI_);
140 bool orientationsRequired =
false;
142 std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator physIter;
143 for(physIter=physicsBlocks.begin();physIter!=physicsBlocks.end();++physIter) {
146 const std::vector<StrPureBasisPair> & blockFields = pb->
getProvidedDOFs();
149 std::set<StrPureBasisPair,StrPureBasisComp> fieldNames;
150 fieldNames.insert(blockFields.begin(),blockFields.end());
153 std::set<StrPureBasisPair,StrPureBasisComp>::const_iterator fieldItr;
154 for (fieldItr=fieldNames.begin();fieldItr!=fieldNames.end();++fieldItr) {
156 orientationsRequired |= fieldItr->second->requiresOrientations();
159 = fieldItr->second->getIntrepid2Basis();
166 dofManager->setOrientationsRequired(orientationsRequired);
168 std::vector<std::vector<std::string> > blocks;
169 buildBlocking(fieldOrder,blocks);
170 dofManager->setFieldOrder(blocks);
172 dofManager->buildGlobalUnknowns();