11 #ifndef PANZER_BlockedDOF_MANAGER_FACTORY_IMPL_HPP
12 #define PANZER_BlockedDOF_MANAGER_FACTORY_IMPL_HPP
26 std::vector<std::string> tokens;
35 if(tokens[0]!=
"blocked:")
39 bool acceptsHyphen =
false;
40 for(std::size_t i=1;i<tokens.size();i++) {
44 "Blocked assembly: Error \"Field Order\" hyphen error at "
47 if(acceptsHyphen && tokens[i]==
"-")
48 acceptsHyphen =
false;
58 buildBlocking(
const std::string & fieldOrder,std::vector<std::vector<std::string> > & blocks)
63 std::vector<std::string> tokens;
69 for(std::size_t i=1;i<tokens.size();i++) {
71 if(tokens[i]!=
"-" && tokens[i-1]!=
"-") {
73 if(current!=Teuchos::null)
74 blocks.push_back(*current);
80 current->push_back(tokens[i]);
83 if(current!=Teuchos::null)
84 blocks.push_back(*current);
91 const std::string & fieldOrder)
const
106 bool orientationsRequired =
false;
108 std::vector<Teuchos::RCP<panzer::PhysicsBlock> >::const_iterator physIter;
109 for(physIter=physicsBlocks.begin();physIter!=physicsBlocks.end();++physIter) {
112 const std::vector<StrPureBasisPair> & blockFields = pb->
getProvidedDOFs();
115 std::set<StrPureBasisPair,StrPureBasisComp> fieldNames;
116 fieldNames.insert(blockFields.begin(),blockFields.end());
119 std::set<StrPureBasisPair,StrPureBasisComp>::const_iterator fieldItr;
120 for (fieldItr=fieldNames.begin();fieldItr!=fieldNames.end();++fieldItr) {
122 orientationsRequired |= fieldItr->second->requiresOrientations();
125 = fieldItr->second->getIntrepid2Basis();
134 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