50 ModuleKey ProcessBoundaryExtract::className =
53 ProcessBoundaryExtract::create,
54 "Extract Boundary field");
62 ConfigOption(
true,
"NotSet",
"Extract fld values to boundary");
66 f->m_writeBndFld =
true;
67 f->m_declareExpansionAsContField =
true;
68 f->m_requireBoundaryExpansion =
true;
79 if (
m_f->m_comm->TreatAsRankZero())
81 cout <<
"ProcessBoundaryExtract: Setting up boundary extraction..."
86 m_f->m_fldToBnd =
m_config[
"fldtoboundary"].m_beenSet;
87 m_f->m_addNormals =
m_config[
"addnormals"].m_beenSet;
90 if ((
m_f->m_inputfiles.count(
"xml") == 0) &&
91 (
m_f->m_inputfiles.count(
"xml.gz") == 0))
93 cout <<
"An xml or xml.gz input file must be specified for the "
94 "boundary extraction module"
101 if ((
m_f->m_inputfiles.count(
"fld") == 0) &&
102 (
m_f->m_inputfiles.count(
"chk") == 0) &&
103 (
m_f->m_inputfiles.count(
"rst") == 0))
105 cout <<
"A fld or chk or rst input file must be specified for "
106 <<
"the boundary extraction module with fldtoboundary option."
114 string bvalues =
m_config[
"bnd"].as<
string>();
116 if (boost::iequals(bvalues,
"All"))
121 m_f->m_exp[0]->GetGraph());
125 SpatialDomains::BoundaryRegionCollection::const_iterator breg_it;
126 for (breg_it = bregions.begin(); breg_it != bregions.end(); ++breg_it)
128 numBndExp = max(numBndExp, breg_it->first);
136 m_f->m_session->GetComm()->AllReduce(numBndExp,
140 for (
int i = 0; i < numBndExp; ++i)
142 m_f->m_bndRegionsToWrite.push_back(i);
148 m_f->m_bndRegionsToWrite),
149 "Failed to interpret bnd values string");
map< string, ConfigOption > m_config
List of configuration values.
#define ASSERTL0(condition, msg)
static bool GenerateOrderedVector(const char *const str, std::vector< unsigned int > &vec)
Represents a command-line configuration option.
pair< ModuleType, string > ModuleKey
boost::shared_ptr< Field > FieldSharedPtr
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
const BoundaryRegionCollection & GetBoundaryRegions(void) const
Abstract base class for processing modules.
ModuleFactory & GetModuleFactory()
FieldSharedPtr m_f
Field object.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.