21 params.
addClassDescription(
"Action that adds the elastic driving force for each order parameter");
22 params.
addRequiredParam<
unsigned int>(
"op_num",
"specifies the number of grains to create");
23 params.
addRequiredParam<std::string>(
"var_name_base",
"specifies the base name of the variables");
25 "use_displaced_mesh",
false,
"Whether to use displaced mesh in the kernels");
26 params.
addParam<std::string>(
"base_name",
27 "Optional parameter that allows the user to define " 28 "multiple mechanics material systems on the same " 29 "block, i.e. for multiple phases");
36 _op_num(getParam<unsigned
int>(
"op_num")),
37 _var_name_base(getParam<
std::string>(
"var_name_base")),
38 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
39 _elasticity_tensor_name(_base_name +
"elasticity_tensor")
47 Moose::err <<
"Inside the PolycrystalElasticDrivingForceAction Object\n";
51 for (
unsigned int op = 0; op <
_op_num; ++op)
57 MaterialPropertyName D_stiff_name =
61 std::string kernel_type =
"ACGrGrElasticDrivingForce";
65 poly_params.
set<NonlinearVariableName>(
"variable") = var_name;
66 poly_params.
set<MaterialPropertyName>(
"D_tensor_name") = D_stiff_name;
67 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
69 std::string kernel_name =
"AC_ElasticDrivingForce_" + var_name;
72 _problem->addKernel(kernel_type, kernel_name, poly_params);
const unsigned int _op_num
Number of order parameters used in the model.
InputParameters getValidParams(const std::string &name) const
const MaterialPropertyName derivativePropertyNameFirst(const MaterialPropertyName &base, const SymbolName &c1) const
std::string _var_name_base
Base name for the order parameters.
Action that adds the elastic driving force for each order parameter.
static InputParameters validParams()
std::string _elasticity_tensor_name
std::string stringify(const T &t)
std::shared_ptr< FEProblemBase > & _problem
PolycrystalElasticDrivingForceAction(const InputParameters ¶ms)
registerMooseAction("PhaseFieldApp", PolycrystalElasticDrivingForceAction, "add_kernel")
static InputParameters validParams()
void ErrorVector unsigned int