39#include <boost/core/ignore_unused.hpp>
54 "Extract Boundary field");
63 f->m_writeBndFld =
true;
64 f->m_declareExpansionAsContField =
true;
65 f->m_requireBoundaryExpansion =
true;
76 m_f->m_addNormals =
m_config[
"addnormals"].as<
bool>();
79 string bvalues =
m_config[
"bnd"].as<
string>();
81 vector<unsigned int> bndRegions;
82 if (boost::iequals(bvalues,
"All"))
87 m_f->m_exp[0]->GetGraph());
91 for (
auto &breg_it : bregions)
93 numBndExp = max(numBndExp, breg_it.first);
101 m_f->m_comm->GetSpaceComm()->AllReduce(numBndExp,
105 for (
int i = 0; i < numBndExp; ++i)
107 bndRegions.push_back(i);
113 "Failed to interpret bnd values string");
116 if (
m_f->m_bndRegionsToWrite.size())
120 "Incompatible bnd parameters.");
124 m_f->m_bndRegionsToWrite = bndRegions;
126 if (
m_f->m_exp[0]->GetNumElmts() != 0)
128 for (
int i = 0; i <
m_f->m_exp.size(); ++i)
130 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
The above copyright notice and this permission notice shall be included.
Represents a command-line configuration option.