50 ModuleKey ProcessBoundaryExtract::className =
53 ProcessBoundaryExtract::create,
"Extract Boundary field");
63 f->m_writeBndFld =
true;
64 f->m_declareExpansionAsContField =
true;
76 if(
m_f->m_comm->GetRank() == 0)
78 cout <<
"ProcessBoundaryExtract: Setting up boundary extraction..."
83 m_f->m_fldToBnd =
m_config[
"fldtoboundary"].m_beenSet;
84 m_f->m_addNormals =
m_config[
"addnormals"].m_beenSet;
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;
95 if((
m_f->m_inputfiles.count(
"fld") == 0) &&
96 (
m_f->m_inputfiles.count(
"chk") == 0) &&
97 (
m_f->m_inputfiles.count(
"rst") == 0))
99 cout <<
"A fld or chk or rst input file must be specified for "
100 <<
"the boundary extraction module with fldtoboundary option."
108 string bvalues =
m_config[
"bnd"].as<
string>();
110 if(boost::iequals(bvalues,
"All"))
115 m_f->m_exp[0]->GetGraph());
119 SpatialDomains::BoundaryRegionCollection::const_iterator breg_it;
120 for(breg_it = bregions.begin(); breg_it != bregions.end();
123 numBndExp = max(numBndExp,breg_it->first);
134 for(
int i = 0; i < numBndExp; ++i)
136 m_f->m_bndRegionsToWrite.push_back(i);
142 m_f->m_bndRegionsToWrite),
143 "Failed to interpret bnd values string");
#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
ModuleFactory & GetModuleFactory()
Abstract base class for processing modules.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.