www.mooseframework.org
PFCRFFKernelAction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "PFCRFFKernelAction.h"
11 #include "Factory.h"
12 #include "FEProblem.h"
13 #include "Conversion.h"
14 
15 registerMooseAction("PhaseFieldApp", PFCRFFKernelAction, "add_kernel");
16 
17 template <>
18 InputParameters
20 {
21  InputParameters params = validParams<HHPFCRFFSplitKernelAction>();
22  params.addParam<Real>("a", 1.0, "Parameter in the Taylor series expansion");
23  params.addParam<Real>("b", 1.0, "Parameter in the Taylor series expansion");
24  params.addParam<Real>("c", 1.0, "Parameter in the Taylor series expansion");
25  return params;
26 }
27 
28 PFCRFFKernelAction::PFCRFFKernelAction(const InputParameters & params)
30 {
31 }
32 
33 void
35 {
36  // Create the two kernels required for the n_variable, starting with the time derivative
37  InputParameters poly_params = _factory.getValidParams("TimeDerivative");
38  poly_params.set<NonlinearVariableName>("variable") = _n_name;
39  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
40  _problem->addKernel("TimeDerivative", "IE_n", poly_params);
41 
42  // First, we have to create the vector containing the names of the real L variables
43  std::vector<VariableName> real_v(_num_L);
44  for (unsigned int l = 0; l < _num_L; ++l)
45  real_v[l] = _L_name_base + Moose::stringify(l) + "_real";
46 
47  // CHPFCRFF kernel
48  poly_params = _factory.getValidParams("CHPFCRFF");
49  poly_params.set<NonlinearVariableName>("variable") = _n_name;
50  poly_params.set<std::vector<VariableName>>("v") = real_v;
51  poly_params.applyParameters(parameters());
52  _problem->addKernel("CHPFCRFF", "CH_bulk_n", poly_params);
53 
54  // Loop over the L_variables
56 }
PFCRFFKernelAction::PFCRFFKernelAction
PFCRFFKernelAction(const InputParameters &params)
Definition: PFCRFFKernelAction.C:28
PFCRFFKernelAction.h
validParams< HHPFCRFFSplitKernelAction >
InputParameters validParams< HHPFCRFFSplitKernelAction >()
Definition: HHPFCRFFSplitKernelAction.C:19
HHPFCRFFSplitKernelAction::_L_name_base
const std::string _L_name_base
Definition: HHPFCRFFSplitKernelAction.h:29
HHPFCRFFSplitKernelAction
Definition: HHPFCRFFSplitKernelAction.h:20
registerMooseAction
registerMooseAction("PhaseFieldApp", PFCRFFKernelAction, "add_kernel")
HHPFCRFFSplitKernelAction::_num_L
const unsigned int _num_L
Definition: HHPFCRFFSplitKernelAction.h:28
PFCRFFKernelAction
Definition: PFCRFFKernelAction.h:20
validParams< PFCRFFKernelAction >
InputParameters validParams< PFCRFFKernelAction >()
Definition: PFCRFFKernelAction.C:19
PFCRFFKernelAction::act
virtual void act()
Definition: PFCRFFKernelAction.C:34
HHPFCRFFSplitKernelAction::act
virtual void act()
Definition: HHPFCRFFSplitKernelAction.C:49
HHPFCRFFSplitKernelAction::_n_name
const VariableName _n_name
Definition: HHPFCRFFSplitKernelAction.h:30