43 #ifndef PANZER_BlockedDOF_MANAGER_FACTORY_IMPL_HPP 44 #define PANZER_BlockedDOF_MANAGER_FACTORY_IMPL_HPP 53 template <
typename LO,
typename GO>
57 std::vector<std::string> tokens;
66 if(tokens[0]!=
"blocked:")
70 bool acceptsHyphen =
false;
71 for(std::size_t i=1;i<tokens.size();i++) {
75 "Blocked assembly: Error \"Field Order\" hyphen error at " 78 if(acceptsHyphen && tokens[i]==
"-")
79 acceptsHyphen =
false;
88 template <
typename LO,
typename GO>
95 std::vector<std::string> tokens;
101 for(std::size_t i=1;i<tokens.size();i++) {
103 if(tokens[i]!=
"-" && tokens[i-1]!=
"-") {
105 if(current!=Teuchos::null)
106 blocks.push_back(*current);
112 current->push_back(tokens[i]);
115 if(current!=Teuchos::null)
116 blocks.push_back(*current);
119 template <
typename LO,
typename GO>
124 const std::string & fieldOrder)
const 135 dofManager->enableTieBreak(useTieBreak_);
136 dofManager->setUseDOFManagerFEI(useDOFManagerFEI_);
139 bool orientationsRequired =
false;
141 std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator physIter;
142 for(physIter=physicsBlocks.begin();physIter!=physicsBlocks.end();++physIter) {
145 const std::vector<StrPureBasisPair> & blockFields = pb->
getProvidedDOFs();
148 std::set<StrPureBasisPair,StrPureBasisComp> fieldNames;
149 fieldNames.insert(blockFields.begin(),blockFields.end());
152 std::set<StrPureBasisPair,StrPureBasisComp>::const_iterator fieldItr;
153 for (fieldItr=fieldNames.begin();fieldItr!=fieldNames.end();++fieldItr) {
155 orientationsRequired |= fieldItr->second->requiresOrientations();
158 = fieldItr->second->getIntrepid2Basis();
165 dofManager->setOrientationsRequired(orientationsRequired);
167 std::vector<std::vector<std::string> > blocks;
168 buildBlocking(fieldOrder,blocks);
169 dofManager->setFieldOrder(blocks);
171 dofManager->buildGlobalUnknowns();
basic_FancyOStream & setShowProcRank(const bool showProcRank)
static void buildBlocking(const std::string &fieldorder, std::vector< std::vector< std::string > > &blocks)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
std::string elementBlockID() const
PHX::MDField< ScalarT > vector
virtual Teuchos::RCP< panzer::UniqueGlobalIndexer< LO, std::pair< int, GO > > > buildUniqueGlobalIndexer(const Teuchos::RCP< const Teuchos::OpaqueWrapper< MPI_Comm > > &mpiComm, const std::vector< Teuchos::RCP< panzer::PhysicsBlock > > &physicsBlocks, const Teuchos::RCP< ConnManager< LO, GO > > &connMngr, const std::string &fieldOrder="") const
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
basic_FancyOStream & setOutputToRootOnly(const int rootRank)
const std::vector< StrPureBasisPair > & getProvidedDOFs() const
void StringTokenizer(std::vector< std::string > &tokens, const std::string &str, const std::string delimiters, bool trim)
Tokenize a string, put tokens in a vector.
#define TEUCHOS_ASSERT(assertion_test)
static bool requiresBlocking(const std::string &fieldorder)