19 "variable",
"The names of the variables that this ExtraIDIntegralReporter operates on");
21 "id_name",
"The list of extra ids name by which to separate integrals.");
22 params.
addParam<std::vector<SubdomainName>>(
23 "block",
"The list of blocks (ids or names) that this object will be applied");
24 params.
addClassDescription(
"This ExtraIDIntegralReporter source code is to integrate variables " 25 "based on parsed extra IDs based on reporter system.");
34 auto var_names = getParam<std::vector<VariableName>>(
"variable");
35 auto extra_id_names = getParam<std::vector<ExtraElementIDName>>(
"id_name");
38 vpp_params.
set<std::vector<VariableName>>(
"variable")
39 .insert(vpp_params.set<std::vector<VariableName>>(
"variable").end(),
42 vpp_params.set<std::vector<ExtraElementIDName>>(
"id_name").insert(
43 vpp_params.set<std::vector<ExtraElementIDName>>(
"id_name").end(),
44 extra_id_names.begin(),
45 extra_id_names.end());
48 auto blocks = getParam<std::vector<SubdomainName>>(
"block");
49 vpp_params.set<std::vector<SubdomainName>>(
"block").insert(
50 vpp_params.set<std::vector<SubdomainName>>(
"block").end(),
blocks.begin(),
blocks.end());
53 vpp_params.set<
ExecFlagEnum>(
"execute_on") = getParam<ExecFlagEnum>(
"execute_on");
54 const VectorPostprocessorName vpp_name =
_name +
"_extra_id_vpp";
64 for (
unsigned int i = 0; i < unique_extra_ids.size(); ++i)
66 (*unique_extra_ids[i]).begin(),
67 (*unique_extra_ids[i]).end());
77 auto &
info = json[
"extra_id_data"];
78 info[
"num_id_name"] = extra_id_data.
names.size();
80 info[
"num_values_per_integral"] = extra_id_data.
integrals.size();
83 auto & integrals = json[
"integrals"];
84 integrals[
"num_variables"] = extra_id_data.
variables.size();
85 integrals[
"variable_names"] = extra_id_data.
variables;
86 for (
unsigned int i = 0; i < extra_id_data.
variables.size(); ++i)
std::string name(const ElemQuality q)
A MultiMooseEnum object to hold "execute_on" flags.
T & getUserObject(const std::string &name, unsigned int tid=0) const
Get the user object by its name.
const std::string & _name
The name of this class.
Reporter object that has a single execution of the "execute" method for for each execute flag...
InputParameters getValidParams(const std::string &name) const
Get valid parameters for the object.
static InputParameters validParams()
Factory & getFactory()
Retrieve a writable reference to the Factory associated with this App.
virtual void addVectorPostprocessor(const std::string &pp_name, const std::string &name, InputParameters ¶meters)
MooseApp & _app
The MOOSE application this is associated with.
FEProblemBase & _fe_problem
Reference to the FEProblemBase for this user object.
const ReporterMode REPORTER_MODE_REPLICATED
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.