35 paramError(
"property",
"variable_base and property must be vectors of the same size");
38 unsigned int dim =
_mesh->dimension();
40 const std::vector<char> suffix = {
'x',
'y',
'z'};
42 for (
unsigned int gr = 0; gr <
_grain_num; ++gr)
43 for (
unsigned int val = 0; val <
_num_var; ++val)
44 for (
unsigned int x = 0;
x <
dim; ++
x)
49 params.
set<AuxVariableName>(
"variable") = var_name;
50 params.
set<MaterialPropertyName>(
"property") =
_prop[val];
51 params.
set<
unsigned int>(
"component") =
x;
52 params.
set<
unsigned int>(
"index") = gr;
53 params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
55 std::string aux_kernel_name = var_name;
56 _problem->addAuxKernel(
"MaterialStdVectorRealGradientAux", aux_kernel_name, params);
const unsigned int _grain_num
number of grains to create
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
MaterialVectorGradAuxKernelAction(const InputParameters ¶ms)
const std::vector< std::string > & _var_name_base
base name for the auxvariables
const std::vector< double > x
static InputParameters validParams()
void paramError(const std::string ¶m, Args... args) const
std::string stringify(const T &t)
std::shared_ptr< MooseMesh > & _mesh
registerMooseAction("PhaseFieldApp", MaterialVectorGradAuxKernelAction, "add_aux_kernel")
std::shared_ptr< FEProblemBase > & _problem