Skip to content

Commit

Permalink
Added use_displaced_mesh to all kernel actions in MARMOT for idaholab#54
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Tonks authored and dschwen committed Jul 2, 2015
1 parent 390b010 commit 5f7f04f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/phase_field/src/action/CHPFCRFFSplitKernelAction.C
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ InputParameters validParams<CHPFCRFFSplitKernelAction>()
params.addRequiredParam<MooseEnum>("log_approach", log_options, "Which approach will be used to handle the natural log");
params.addParam<Real>("tol", 1.0e-9, "Tolerance used when the tolerance approach is chosen");
params.addParam<Real>("n_exp_terms", 4.0, "Number of terms used in the Taylor expansion of the natural log term");
params.addParam<bool>("use_displaced_mesh", false, "Whether to use displaced mesh in the kernels");
return params;
}

Expand All @@ -39,6 +40,7 @@ CHPFCRFFSplitKernelAction::act()
// Create the two kernels required for the n_variable, starting with the time derivative
InputParameters poly_params = _factory.getValidParams("TimeDerivative");
poly_params.set<NonlinearVariableName>("variable") = _n_name;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

_problem->addKernel("TimeDerivative", "IE_n", poly_params);

Expand All @@ -62,6 +64,7 @@ CHPFCRFFSplitKernelAction::act()
poly_params.set<MooseEnum>("log_approach") = getParam<MooseEnum>("log_approach");
poly_params.set<Real>("tol") = getParam<Real>("tol");
poly_params.set<Real>("n_exp_terms") = getParam<Real>("n_exp_terms");
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

_problem->addKernel("CHPFCRFF", "CH_bulk_n", poly_params);

Expand Down
9 changes: 9 additions & 0 deletions modules/phase_field/src/action/HHPFCRFFSplitKernelAction.C
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ InputParameters validParams<HHPFCRFFSplitKernelAction>()
params.addRequiredParam<MooseEnum>("log_approach", log_options, "Which approach will be used to handle the natural log");
params.addParam<Real>("tol", 1.0e-9, "Tolerance used when the tolerance approach is chosen");
params.addParam<Real>("n_exp_terms", 4, "Number of terms used in the Taylor expansion of the natural log term");
params.addParam<bool>("use_displaced_mesh", false, "Whether to use displaced mesh in the kernels");

return params;
}
Expand Down Expand Up @@ -56,6 +57,7 @@ HHPFCRFFSplitKernelAction::act()
// **Create the diffusion kernel for L_real_l
InputParameters poly_params = _factory.getValidParams("Diffusion");
poly_params.set<NonlinearVariableName>("variable") = real_name;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

std::string kernel_name = "diff_";
kernel_name.append(real_name);
Expand All @@ -70,6 +72,7 @@ HHPFCRFFSplitKernelAction::act()
std::string pname = "alpha_R_";
pname.append(out.str());
poly_params.set<std::string>("prop_name") = pname;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

kernel_name = "HH1_";
kernel_name.append(real_name);
Expand All @@ -83,6 +86,7 @@ HHPFCRFFSplitKernelAction::act()
poly_params.set<NonlinearVariableName>("variable") = real_name;
poly_params.set<bool>("positive") = false;
poly_params.set<std::vector<VariableName> >("coupled_var").push_back(imag_name);
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "alpha_I_";
pname.append(out.str());
Expand All @@ -99,6 +103,7 @@ HHPFCRFFSplitKernelAction::act()
poly_params.set<NonlinearVariableName>("variable") = real_name;
poly_params.set<bool>("positive") = false;
poly_params.set<std::vector<VariableName> >("coupled_var").push_back(_n_name);
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "A_R_";
pname.append(out.str());
Expand All @@ -114,6 +119,7 @@ HHPFCRFFSplitKernelAction::act()
// **Create the diffusion kernel for L_imag_l
InputParameters poly_params = _factory.getValidParams("Diffusion");
poly_params.set<NonlinearVariableName>("variable") = imag_name;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

kernel_name = "diff_";
kernel_name.append(imag_name);
Expand All @@ -124,6 +130,7 @@ HHPFCRFFSplitKernelAction::act()
poly_params = _factory.getValidParams("HHPFCRFF");
poly_params.set<NonlinearVariableName>("variable") = imag_name;
poly_params.set<bool>("positive") = true;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "alpha_R_";
pname.append(out.str());
Expand All @@ -139,6 +146,7 @@ HHPFCRFFSplitKernelAction::act()
poly_params.set<NonlinearVariableName>("variable") = imag_name;
poly_params.set<bool>("positive") = true;
poly_params.set<std::vector<VariableName> >("coupled_var").push_back(real_name);
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "alpha_I_";
pname.append(out.str());
Expand All @@ -154,6 +162,7 @@ HHPFCRFFSplitKernelAction::act()
poly_params.set<NonlinearVariableName>("variable") = imag_name;
poly_params.set<bool>("positive") = false;
poly_params.set<std::vector<VariableName> >("coupled_var").push_back(_n_name);
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "A_I_";
pname.append(out.str());
Expand Down
10 changes: 10 additions & 0 deletions modules/phase_field/src/action/PFCRFFKernelAction.C
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ InputParameters validParams<PFCRFFKernelAction>()
params.addParam<Real>("a", 1.0, "Parameter in the taylor series expansion");
params.addParam<Real>("b", 1.0, "Parameter in the taylor series expansion");
params.addParam<Real>("c", 1.0, "Parameter in the taylor series expansion");
params.addParam<bool>("use_displaced_mesh", false, "Whether to use displaced mesh in the kernels");

return params;
}
Expand All @@ -43,6 +44,7 @@ PFCRFFKernelAction::act()
// Create the two kernels required for the n_variable, starting with the time derivative
InputParameters poly_params = _factory.getValidParams("TimeDerivative");
poly_params.set<NonlinearVariableName>("variable") = _n_name;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

_problem->addKernel("TimeDerivative", "IE_n", poly_params);

Expand Down Expand Up @@ -70,6 +72,7 @@ PFCRFFKernelAction::act()
poly_params.set<Real>("a") = getParam<Real>("a");
poly_params.set<Real>("b") = getParam<Real>("b");
poly_params.set<Real>("b") = getParam<Real>("c");
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

_problem->addKernel("CHPFCRFF", "CH_bulk_n", poly_params);

Expand All @@ -92,6 +95,7 @@ PFCRFFKernelAction::act()
// **Create the diffusion kernel for L_real_l
InputParameters poly_params = _factory.getValidParams("Diffusion");
poly_params.set<NonlinearVariableName>("variable") = real_name;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

std::string kernel_name = "diff_";
kernel_name.append(real_name);
Expand All @@ -106,6 +110,7 @@ PFCRFFKernelAction::act()
std::string pname = "alpha_R_";
pname.append(out.str());
poly_params.set<std::string>("prop_name") = pname;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

kernel_name = "HH1_";
kernel_name.append(real_name);
Expand All @@ -119,6 +124,7 @@ PFCRFFKernelAction::act()
poly_params.set<NonlinearVariableName>("variable") = real_name;
poly_params.set<bool>("positive") = false;
poly_params.set<std::vector<VariableName> >("coupled_var").push_back(imag_name);
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "alpha_I_";
pname.append(out.str());
Expand All @@ -135,6 +141,7 @@ PFCRFFKernelAction::act()
poly_params.set<NonlinearVariableName>("variable") = real_name;
poly_params.set<bool>("positive") = false;
poly_params.set<std::vector<VariableName> >("coupled_var").push_back(_n_name);
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "A_R_";
pname.append(out.str());
Expand All @@ -160,6 +167,7 @@ PFCRFFKernelAction::act()
poly_params = _factory.getValidParams("HHPFCRFF");
poly_params.set<NonlinearVariableName>("variable") = imag_name;
poly_params.set<bool>("positive") = true;
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "alpha_R_";
pname.append(out.str());
Expand All @@ -175,6 +183,7 @@ PFCRFFKernelAction::act()
poly_params.set<NonlinearVariableName>("variable") = imag_name;
poly_params.set<bool>("positive") = true;
poly_params.set<std::vector<VariableName> >("coupled_var").push_back(real_name);
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "alpha_I_";
pname.append(out.str());
Expand All @@ -190,6 +199,7 @@ PFCRFFKernelAction::act()
poly_params.set<NonlinearVariableName>("variable") = imag_name;
poly_params.set<bool>("positive") = false;
poly_params.set<std::vector<VariableName> >("coupled_var").push_back(_n_name);
poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");

pname = "A_I_";
pname.append(out.str());
Expand Down

0 comments on commit 5f7f04f

Please sign in to comment.