50 "Extract Boundary field");
59 f->m_writeBndFld =
true;
60 f->m_declareExpansionAsContField =
true;
61 f->m_requireBoundaryExpansion =
true;
72 m_f->m_addNormals =
m_config[
"addnormals"].as<
bool>();
75 string bvalues =
m_config[
"bnd"].as<
string>();
77 vector<unsigned int> bndRegions;
78 if (boost::iequals(bvalues,
"All"))
83 m_f->m_exp[0]->GetGraph());
87 for (
auto &breg_it : bregions)
89 numBndExp = max(numBndExp, breg_it.first);
97 m_f->m_comm->GetSpaceComm()->AllReduce(numBndExp,
101 for (
int i = 0; i < numBndExp; ++i)
103 bndRegions.push_back(i);
109 "Failed to interpret bnd values string");
112 if (
m_f->m_bndRegionsToWrite.size())
116 "Incompatible bnd parameters.");
120 m_f->m_bndRegionsToWrite = bndRegions;
123 if (
m_f->m_exp[0]->GetNumElmts() != 0)
125 for (
int i = 0; i <
m_f->m_exp.size(); ++i)
127 m_f->m_exp[i]->FillBndCondFromField(
m_f->m_exp[i]->GetCoeffs());
#define ASSERTL0(condition, msg)
FieldSharedPtr m_f
Field object.
std::map< std::string, ConfigOption > m_config
List of configuration values.
Abstract base class for processing modules.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static bool GenerateVector(const std::string &str, std::vector< T > &out)
Takes a comma-separated string and converts it to entries in a vector.
const BoundaryRegionCollection & GetBoundaryRegions(void) const
std::shared_ptr< Field > FieldSharedPtr
std::pair< ModuleType, std::string > ModuleKey
ModuleFactory & GetModuleFactory()
std::map< int, BoundaryRegionShPtr > BoundaryRegionCollection
Represents a command-line configuration option.