22 "Set up kernels for the rational function fit (RFF) phase field crystal model");
24 "num_L",
"specifies the number of complex L variables will be solved for");
25 params.
addRequiredParam<VariableName>(
"n_name",
"Variable name used for the n variable");
26 params.
addRequiredParam<std::string>(
"L_name_base",
"Base name for the complex L variables");
27 params.
addParam<MaterialPropertyName>(
"mob_name",
"M",
"The mobility used for n in this model");
28 MooseEnum log_options(
"tolerance cancelation expansion");
30 "log_approach", log_options,
"Which approach will be used to handle the natural log");
31 params.
addParam<
Real>(
"tol", 1.0e-9,
"Tolerance used when the tolerance approach is chosen");
33 "n_exp_terms", 4,
"Number of terms used in the Taylor expansion of the natural log term");
35 "use_displaced_mesh",
false,
"Whether to use displaced mesh in the kernels");
41 _num_L(getParam<unsigned
int>(
"num_L")),
42 _L_name_base(getParam<
std::string>(
"L_name_base")),
43 _n_name(getParam<VariableName>(
"n_name"))
51 for (
unsigned int l = 0; l <
_num_L; ++l)
57 std::string real_name = L_name +
"_real";
58 std::string imag_name = L_name +
"_imag";
66 poly_params.
set<NonlinearVariableName>(
"variable") = real_name;
67 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
68 _problem->addKernel(
"Diffusion",
"diff_" + real_name, poly_params);
72 poly_params.
set<NonlinearVariableName>(
"variable") = real_name;
73 poly_params.
set<
bool>(
"positive") =
true;
75 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
76 _problem->addKernel(
"HHPFCRFF",
"HH1_" + real_name, poly_params);
82 poly_params.
set<NonlinearVariableName>(
"variable") = real_name;
83 poly_params.
set<
bool>(
"positive") =
false;
84 poly_params.
set<std::vector<VariableName>>(
"coupled_var").push_back(imag_name);
85 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
87 _problem->addKernel(
"HHPFCRFF",
"HH2_" + real_name, poly_params);
92 poly_params.
set<NonlinearVariableName>(
"variable") = real_name;
93 poly_params.
set<
bool>(
"positive") =
false;
94 poly_params.
set<std::vector<VariableName>>(
"coupled_var").push_back(
_n_name);
95 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
97 _problem->addKernel(
"HHPFCRFF",
"HH3_" + real_name, poly_params);
106 poly_params.
set<NonlinearVariableName>(
"variable") = imag_name;
107 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
108 _problem->addKernel(
"Diffusion",
"diff_" + imag_name, poly_params);
112 poly_params.
set<NonlinearVariableName>(
"variable") = imag_name;
113 poly_params.
set<
bool>(
"positive") =
true;
114 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
116 _problem->addKernel(
"HHPFCRFF",
"HH1_" + imag_name, poly_params);
120 poly_params.
set<NonlinearVariableName>(
"variable") = imag_name;
121 poly_params.
set<
bool>(
"positive") =
true;
122 poly_params.
set<std::vector<VariableName>>(
"coupled_var").push_back(real_name);
123 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
125 _problem->addKernel(
"HHPFCRFF",
"HH2_" + imag_name, poly_params);
129 poly_params.
set<NonlinearVariableName>(
"variable") = imag_name;
130 poly_params.
set<
bool>(
"positive") =
false;
131 poly_params.
set<std::vector<VariableName>>(
"coupled_var").push_back(
_n_name);
132 poly_params.
set<
bool>(
"use_displaced_mesh") = getParam<bool>(
"use_displaced_mesh");
134 _problem->addKernel(
"HHPFCRFF",
"HH3_" + imag_name, poly_params);
static InputParameters validParams()
InputParameters getValidParams(const std::string &name) const
const VariableName _n_name
static InputParameters validParams()
HHPFCRFFSplitKernelAction(const InputParameters ¶ms)
const std::string _L_name_base
const unsigned int _num_L
std::string stringify(const T &t)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
registerMooseAction("PhaseFieldApp", HHPFCRFFSplitKernelAction, "add_kernel")
std::shared_ptr< FEProblemBase > & _problem
void ErrorVector unsigned int