22 "Outputs all components of the standard vector-valued properties specified");
24 "grain_num",
"Value that specifies the number of grains to create aux kernels for.");
26 "variable_base",
"Vector specifies the base name of the variables.");
28 "The material property names.");
30 "use_displaced_mesh",
false,
"Whether to use displaced mesh in the kernels.");
36 _grain_num(getParam<unsigned
int>(
"grain_num")),
37 _var_name_base(getParam<
std::vector<
std::string>>(
"variable_base")),
38 _num_var(_var_name_base.size()),
39 _prop(getParam<
std::vector<MaterialPropertyName>>(
"property")),
40 _num_prop(_prop.size())
48 paramError(
"property",
"variable_base and property must be vectors of the same size");
50 for (
unsigned int gr = 0; gr <
_grain_num; ++gr)
51 for (
unsigned int val = 0; val <
_num_var; ++val)
56 params.
set<AuxVariableName>(
"variable") = var_name;
57 params.
set<MaterialPropertyName>(
"property") =
_prop[val];
58 params.
set<
unsigned int>(
"index") = gr;
59 params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
61 std::string aux_kernel_name = var_name;
62 _problem->addAuxKernel(
"MaterialStdVectorAux", aux_kernel_name, params);
const unsigned int _grain_num
number of grains to create
MaterialVectorAuxKernelAction(const InputParameters ¶ms)
const std::vector< MaterialPropertyName > & _prop
list of material properties to be used
const unsigned int _num_prop
number of properties
static InputParameters validParams()
const unsigned int _num_var
number of auxvariables
InputParameters getValidParams(const std::string &name) const
const std::vector< std::string > & _var_name_base
base name for the auxvariables
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
std::string stringify(const T &t)
std::shared_ptr< FEProblemBase > & _problem
void ErrorVector unsigned int
registerMooseAction("PhaseFieldApp", MaterialVectorAuxKernelAction, "add_aux_kernel")