48 "compute the mean of each field over the domain.");
62 int nfields =
m_f->m_variables.size();
63 int spacedim =
m_f->m_graph->GetMeshDimension() +
m_f->m_numHomogeneousDir;
64 int npoints =
m_f->m_exp[0]->GetNpoints();
71 string name[3] = {
"length",
"area",
"volume"};
72 cout <<
"Domain " <<
name[spacedim - 1] <<
" : " << scale << endl;
75 for (
int i = 0; i < nfields; ++i)
79 if (
m_f->m_comm->GetSpaceComm()->GetRank() == 0)
81 cout <<
"Integral (variable " <<
m_f->m_variables[i]
82 <<
") : " << integral << endl;
83 cout <<
"Mean (variable " <<
m_f->m_variables[i]
84 <<
") : " << integral / scale << endl;
FieldSharedPtr m_f
Field object.
static std::shared_ptr< Module > create(FieldSharedPtr f)
Creates an instance of this class.
ProcessMean(FieldSharedPtr f)
static ModuleKey className
void v_Process(po::variables_map &vm) override
Write mesh to output file.
Abstract base class for processing modules.
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
std::shared_ptr< Field > FieldSharedPtr
std::pair< ModuleType, std::string > ModuleKey
ModuleFactory & GetModuleFactory()