12 #include "FEProblem.h"
13 #include "Conversion.h"
14 #include "AddVariableAction.h"
16 #include "libmesh/string_to_enum.h"
24 InputParameters params = validParams<Action>();
25 MooseEnum familyEnum = AddVariableAction::getNonlinearVariableFamilies();
26 params.addParam<MooseEnum>(
29 "Specifies the family of FE shape functions to use for the L variables");
30 MooseEnum orderEnum = AddVariableAction::getNonlinearVariableOrders();
31 params.addParam<MooseEnum>(
34 "Specifies the order of the FE shape function to use for the L variables");
35 params.addParam<Real>(
"scaling", 1.0,
"Specifies a scaling factor to apply to the L variables");
36 params.addRequiredParam<
unsigned int>(
37 "num_L",
"specifies the number of complex L variables will be solved for");
38 params.addRequiredParam<std::string>(
"L_name_base",
"Base name for the complex L variables");
45 _num_L(getParam<unsigned int>(
"num_L")),
46 _L_name_base(getParam<std::string>(
"L_name_base"))
54 Moose::err <<
"Inside the PFCRFFVariablesAction Object\n";
55 Moose::err <<
"VariableBase: " <<
_L_name_base <<
"\torder: " << getParam<MooseEnum>(
"order")
56 <<
"\tfamily: " << getParam<MooseEnum>(
"family") << std::endl;
59 auto fe_type = AddVariableAction::feType(_pars);
60 auto type = AddVariableAction::determineType(fe_type, 1);
61 auto var_params = _factory.getValidParams(type);
63 var_params.applySpecificParameters(_pars, {
"family",
"order"});
64 var_params.set<std::vector<Real>>(
"scaling") = {getParam<Real>(
"scaling")};
67 for (
unsigned int l = 0; l <
_num_L; ++l)
73 const std::string real_name = L_name +
"_real";
74 _problem->addVariable(type, real_name, var_params);
79 std::string imag_name = L_name +
"_imag";
80 _problem->addVariable(type, imag_name, var_params);