12 #include "FEProblem.h"
13 #include "Conversion.h"
21 InputParameters params = validParams<Action>();
22 params.addRequiredParam<
unsigned int>(
"op_num",
"number of order parameters to create");
23 params.addRequiredParam<std::string>(
"var_name_base",
"specifies the base name of the variables");
24 MooseEnum typ_options(
"continuous discrete");
25 params.addParam<MooseEnum>(
"random_type",
27 "The type of random polycrystal initial condition. Whether one "
28 "order parameter is chosen to be 1 at each node or if each order "
29 "parameter continuously varies from 0 to 1");
36 _op_num(getParam<unsigned int>(
"op_num")),
37 _var_name_base(getParam<std::string>(
"var_name_base")),
38 _random_type(getParam<MooseEnum>(
"random_type"))
46 Moose::err <<
"Inside the PolycrystalRandomICAction Object\n";
50 for (
unsigned int op = 0; op <
_op_num; op++)
53 InputParameters poly_params = _factory.getValidParams(
"PolycrystalRandomIC");
54 poly_params.set<VariableName>(
"variable") =
_var_name_base + Moose::stringify(op);
55 poly_params.set<
unsigned int>(
"op_num") =
_op_num;
56 poly_params.set<
unsigned int>(
"op_index") = op;
57 poly_params.set<
unsigned int>(
"random_type") =
_random_type;
60 _problem->addInitialCondition(
"PolycrystalRandomIC",
61 "ICs/PolycrystalICs/PolycrystalRandomIC_" + Moose::stringify(op),