50 ModuleKey ProcessBoundaryExtract::className =
53 ProcessBoundaryExtract::create,
"Extract Boundary field");
63 f->m_writeBndFld =
true;
64 f->m_declareExpansionAsContField =
true;
78 if(
m_f->m_comm->GetRank() == 0)
80 cout <<
"Process Boundary Extract: Setting up boundary extraction..." << endl;
87 if((
m_f->m_inputfiles.count(
"xml") == 0)&&(
m_f->m_inputfiles.count(
"xml.gz") == 0))
89 cout <<
"An xml or xml.gz input file must be specified for the boundary extraction module" << endl;
93 if((
m_f->m_inputfiles.count(
"fld") == 0)&&(
m_f->m_inputfiles.count(
"chk") == 0)&&(
m_f->m_inputfiles.count(
"rst") == 0))
95 cout <<
"A fld or chk or rst input file must be specified for the boundary extraction module" << endl;
101 string bvalues =
m_config[
"bnd"].as<
string>();
103 if(boost::iequals(bvalues,
"All"))
108 m_f->m_exp[0]->GetGraph());
112 SpatialDomains::BoundaryRegionCollection::const_iterator breg_it;
113 for(breg_it = bregions.begin(); breg_it != bregions.end();
116 numBndExp = max(numBndExp,breg_it->first);
127 for(
int i = 0; i < numBndExp; ++i)
129 m_f->m_bndRegionsToWrite.push_back(i);
135 m_f->m_bndRegionsToWrite),
136 "Failed to interpret bnd values string");
139 m_f->m_fldToBnd =
m_config[
"fldtoboundary"].m_beenSet;
140 m_f->m_addNormals =
m_config[
"addnormals"].m_beenSet;
144 if(
m_f->m_comm->GetRank() == 0)
150 ss << cpuTime <<
"s";
151 cout <<
"Process Boundary Extract CPU Time: " << setw(8) << left
#define ASSERTL0(condition, msg)
pair< ModuleType, string > ModuleKey
static bool GenerateOrderedVector(const char *const str, std::vector< unsigned int > &vec)
map< string, ConfigOption > m_config
List of configuration values.
FieldSharedPtr m_f
Field object.
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
boost::shared_ptr< Field > FieldSharedPtr
Represents a command-line configuration option.
const BoundaryRegionCollection & GetBoundaryRegions(void) const
NekDouble TimePerTest(unsigned int n)
Returns amount of seconds per iteration in a test with n iterations.
ModuleFactory & GetModuleFactory()
Abstract base class for processing modules.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.