50 ModuleKey ProcessBoundaryExtract::className =
53 ProcessBoundaryExtract::create,
"Extract Boundary field");
63 f->m_writeBndFld =
true;
64 f->m_declareExpansionAsContField =
true;
65 f->m_requireBoundaryExpansion =
true;
77 if(
m_f->m_comm->TreatAsRankZero())
79 cout <<
"ProcessBoundaryExtract: Setting up boundary extraction..."
84 m_f->m_fldToBnd =
m_config[
"fldtoboundary"].m_beenSet;
85 m_f->m_addNormals =
m_config[
"addnormals"].m_beenSet;
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;
96 if((
m_f->m_inputfiles.count(
"fld") == 0) &&
97 (
m_f->m_inputfiles.count(
"chk") == 0) &&
98 (
m_f->m_inputfiles.count(
"rst") == 0))
100 cout <<
"A fld or chk or rst input file must be specified for "
101 <<
"the boundary extraction module with fldtoboundary option."
109 string bvalues =
m_config[
"bnd"].as<
string>();
111 if(boost::iequals(bvalues,
"All"))
116 m_f->m_exp[0]->GetGraph());
120 SpatialDomains::BoundaryRegionCollection::const_iterator breg_it;
121 for(breg_it = bregions.begin(); breg_it != bregions.end();
124 numBndExp = max(numBndExp,breg_it->first);
135 for(
int i = 0; i < numBndExp; ++i)
137 m_f->m_bndRegionsToWrite.push_back(i);
143 m_f->m_bndRegionsToWrite),
144 "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.