43 #ifndef PANZER_BlockedDOF_MANAGER_FACTORY_IMPL_HPP
44 #define PANZER_BlockedDOF_MANAGER_FACTORY_IMPL_HPP
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;
90 buildBlocking(
const std::string & fieldOrder,std::vector<std::vector<std::string> > & blocks)
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);
123 const std::string & fieldOrder)
const
138 bool orientationsRequired =
false;
140 std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator physIter;
141 for(physIter=physicsBlocks.begin();physIter!=physicsBlocks.end();++physIter) {
144 const std::vector<StrPureBasisPair> & blockFields = pb->
getProvidedDOFs();
147 std::set<StrPureBasisPair,StrPureBasisComp> fieldNames;
148 fieldNames.insert(blockFields.begin(),blockFields.end());
151 std::set<StrPureBasisPair,StrPureBasisComp>::const_iterator fieldItr;
152 for (fieldItr=fieldNames.begin();fieldItr!=fieldNames.end();++fieldItr) {
154 orientationsRequired |= fieldItr->second->requiresOrientations();
157 = fieldItr->second->getIntrepid2Basis();
166 std::vector<std::vector<std::string> > blocks;
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
void setUseDOFManagerFEI(bool useFEI)
Use the FEI DOF manager internally, or the standard version.
void enableTieBreak(bool useTieBreak)
static bool requiresBlocking(const std::string &fieldorder)
basic_FancyOStream & setShowProcRank(const bool showProcRank)
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
std::string elementBlockID() const
static void buildBlocking(const std::string &fieldorder, std::vector< std::vector< std::string > > &blocks)
basic_FancyOStream & setOutputToRootOnly(const int rootRank)
virtual void buildGlobalUnknowns()
void addField(const std::string &str, const Teuchos::RCP< const FieldPattern > &pattern)
Add a field to the DOF manager.
void setFieldOrder(const std::vector< std::vector< std::string > > &fieldOrder)
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)
void setOrientationsRequired(bool ro)
const std::vector< StrPureBasisPair > & getProvidedDOFs() const