50 ModuleKey ProcessBoundaryExtract::className =
53 ProcessBoundaryExtract::create,
"Extract Boundary field");
63 f->m_writeBndFld =
true;
64 f->m_declareExpansionAsContField =
true;
65 f->m_declareAsNewField =
true;
79 if(
m_f->m_comm->GetRank() == 0)
81 cout <<
"Process Boundary Extract: Setting up boundary extraction..." << endl;
88 if((
m_f->m_inputfiles.count(
"xml") == 0)&&(
m_f->m_inputfiles.count(
"xml.gz") == 0))
90 cout <<
"An xml or xml.gz input file must be specified for the boundary extraction module" << endl;
94 if((
m_f->m_inputfiles.count(
"fld") == 0)&&(
m_f->m_inputfiles.count(
"chk") == 0)&&(
m_f->m_inputfiles.count(
"rst") == 0))
96 cout <<
"A fld or chk or rst input file must be specified for the boundary extraction module" << endl;
102 string bvalues =
m_config[
"bnd"].as<
string>();
104 if(boost::iequals(bvalues,
"All"))
109 m_f->m_exp[0]->GetGraph());
113 SpatialDomains::BoundaryRegionCollection::const_iterator breg_it;
114 for(breg_it = bregions.begin(); breg_it != bregions.end();
117 numBndExp = max(numBndExp,breg_it->first);
128 for(
int i = 0; i < numBndExp; ++i)
130 m_f->m_bndRegionsToWrite.push_back(i);
136 m_f->m_bndRegionsToWrite),
137 "Failed to interpret bnd values string");
140 m_f->m_fldToBnd =
m_config[
"fldtoboundary"].m_beenSet;
141 m_f->m_addNormals =
m_config[
"addnormals"].m_beenSet;
145 if(
m_f->m_comm->GetRank() == 0)
151 ss << cpuTime <<
"s";
152 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.