https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
HHPFCRFFSplitKernelAction Class Reference

#include <HHPFCRFFSplitKernelAction.h>

Inheritance diagram for HHPFCRFFSplitKernelAction:
[legend]

Public Types

typedef DataFileName DataFileParameterType
 

Public Member Functions

 HHPFCRFFSplitKernelAction (const InputParameters &params)
 
virtual void act ()
 
void timedAct ()
 
virtual void addRelationshipManagers (Moose::RelationshipManagerType when_type)
 
MooseObjectName uniqueActionName () const
 
const std::string & specificTaskName () const
 
const std::set< std::string > & getAllTasks () const
 
void appendTask (const std::string &task)
 
MooseAppgetMooseApp () const
 
const std::string & type () const
 
virtual const std::string & name () const
 
std::string typeAndName () const
 
std::string errorPrefix (const std::string &error_type) const
 
void callMooseError (std::string msg, const bool with_prefix) const
 
MooseObjectParameterName uniqueParameterName (const std::string &parameter_name) const
 
const InputParametersparameters () const
 
MooseObjectName uniqueName () const
 
const T & getParam (const std::string &name) const
 
std::vector< std::pair< T1, T2 > > getParam (const std::string &param1, const std::string &param2) const
 
const T * queryParam (const std::string &name) const
 
const T & getRenamedParam (const std::string &old_name, const std::string &new_name) const
 
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 
bool isParamValid (const std::string &name) const
 
bool isParamSetByUser (const std::string &nm) const
 
void paramError (const std::string &param, Args... args) const
 
void paramWarning (const std::string &param, Args... args) const
 
void paramInfo (const std::string &param, Args... args) const
 
void connectControllableParams (const std::string &parameter, const std::string &object_type, const std::string &object_name, const std::string &object_parameter) const
 
void mooseError (Args &&... args) const
 
void mooseErrorNonPrefixed (Args &&... args) const
 
void mooseDocumentedError (const std::string &repo_name, const unsigned int issue_num, Args &&... args) const
 
void mooseWarning (Args &&... args) const
 
void mooseWarningNonPrefixed (Args &&... args) const
 
void mooseDeprecated (Args &&... args) const
 
void mooseInfo (Args &&... args) const
 
std::string getDataFileName (const std::string &param) const
 
std::string getDataFileNameByName (const std::string &relative_path) const
 
std::string getDataFilePath (const std::string &relative_path) const
 
PerfGraphperfGraph ()
 
const Parallel::Communicator & comm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 

Static Public Member Functions

static InputParameters validParams ()
 

Public Attributes

const ConsoleStream _console
 

Static Public Attributes

static constexpr auto SYSTEM
 
static constexpr auto NAME
 

Protected Member Functions

bool addRelationshipManagers (Moose::RelationshipManagerType when_type, const InputParameters &moose_object_pars)
 
void associateWithParameter (const std::string &param_name, InputParameters &params) const
 
void associateWithParameter (const InputParameters &from_params, const std::string &param_name, InputParameters &params) const
 
const T & getMeshProperty (const std::string &data_name, const std::string &prefix)
 
const T & getMeshProperty (const std::string &data_name)
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name, const std::string &prefix) const
 
bool hasMeshProperty (const std::string &data_name) const
 
bool hasMeshProperty (const std::string &data_name) const
 
std::string meshPropertyName (const std::string &data_name) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level) const
 
PerfID registerTimedSection (const std::string &section_name, const unsigned int level, const std::string &live_message, const bool print_dots=true) const
 
std::string timedSectionName (const std::string &section_name) const
 

Static Protected Member Functions

static std::string meshPropertyName (const std::string &data_name, const std::string &prefix)
 

Protected Attributes

const unsigned int _num_L
 
const std::string _L_name_base
 
const VariableName _n_name
 
std::string _registered_identifier
 
std::string _specific_task_name
 
std::set< std::string > _all_tasks
 
ActionWarehouse_awh
 
const std::string & _current_task
 
std::shared_ptr< MooseMesh > & _mesh
 
std::shared_ptr< MooseMesh > & _displaced_mesh
 
std::shared_ptr< FEProblemBase > & _problem
 
PerfID _act_timer
 
MooseApp_app
 
const std::string _type
 
const std::string _name
 
const InputParameters_pars
 
Factory_factory
 
ActionFactory_action_factory
 
MooseApp_pg_moose_app
 
const std::string _prefix
 
const Parallel::Communicator & _communicator
 

Detailed Description

Definition at line 14 of file HHPFCRFFSplitKernelAction.h.

Constructor & Destructor Documentation

◆ HHPFCRFFSplitKernelAction()

HHPFCRFFSplitKernelAction::HHPFCRFFSplitKernelAction ( const InputParameters params)

Definition at line 39 of file HHPFCRFFSplitKernelAction.C.

40  : Action(params),
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"))
44 {
45 }
Action(const InputParameters &parameters)

Member Function Documentation

◆ act()

void HHPFCRFFSplitKernelAction::act ( )
virtual

Implements Action.

Reimplemented in PFCRFFKernelAction.

Definition at line 48 of file HHPFCRFFSplitKernelAction.C.

Referenced by PFCRFFKernelAction::act().

49 {
50  // Loop over the L_variables
51  for (unsigned int l = 0; l < _num_L; ++l)
52  {
53  // Create L base name
54  std::string L_name = _L_name_base + Moose::stringify(l);
55 
56  // Create real and imaginary L variable names
57  std::string real_name = L_name + "_real";
58  std::string imag_name = L_name + "_imag";
59 
60  //
61  // Create the kernels for the real L variable
62  //
63 
64  // Create the diffusion kernel for L_real_l
65  InputParameters poly_params = _factory.getValidParams("Diffusion");
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);
69 
70  // Create the (alpha^R_m L^R_m) term
71  poly_params = _factory.getValidParams("HHPFCRFF");
72  poly_params.set<NonlinearVariableName>("variable") = real_name;
73  poly_params.set<bool>("positive") = true;
74  poly_params.set<MaterialPropertyName>("prop_name") = "alpha_R_" + Moose::stringify(l);
75  poly_params.set<bool>("use_displaced_mesh") = getParam<bool>("use_displaced_mesh");
76  _problem->addKernel("HHPFCRFF", "HH1_" + real_name, poly_params);
77 
78  // **Create the -(alpha^I_m L^I_m) term
79  if (l > 0)
80  {
81  poly_params = _factory.getValidParams("HHPFCRFF");
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");
86  poly_params.set<MaterialPropertyName>("prop_name") = "alpha_I_" + Moose::stringify(l);
87  _problem->addKernel("HHPFCRFF", "HH2_" + real_name, poly_params);
88  }
89 
90  // **Create the -(A^R_m n) term
91  poly_params = _factory.getValidParams("HHPFCRFF");
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");
96  poly_params.set<MaterialPropertyName>("prop_name") = "A_R_" + Moose::stringify(l);
97  _problem->addKernel("HHPFCRFF", "HH3_" + real_name, poly_params);
98 
99  //
100  // Create the kernels for the imaginary L variable, l > 0
101  //
102  if (l > 0)
103  {
104  // Create the diffusion kernel for L_imag_l
105  InputParameters poly_params = _factory.getValidParams("Diffusion");
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);
109 
110  // **Create the (alpha^R_m L^I_m) term
111  poly_params = _factory.getValidParams("HHPFCRFF");
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");
115  poly_params.set<MaterialPropertyName>("prop_name") = "alpha_R_" + Moose::stringify(l);
116  _problem->addKernel("HHPFCRFF", "HH1_" + imag_name, poly_params);
117 
118  // **Create the (alpha^I_m L^R_m) term
119  poly_params = _factory.getValidParams("HHPFCRFF");
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");
124  poly_params.set<MaterialPropertyName>("prop_name") = "alpha_I_" + Moose::stringify(l);
125  _problem->addKernel("HHPFCRFF", "HH2_" + imag_name, poly_params);
126 
127  // **Create the -(A^I_m n) term
128  poly_params = _factory.getValidParams("HHPFCRFF");
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");
133  poly_params.set<MaterialPropertyName>("prop_name") = "A_I_" + Moose::stringify(l);
134  _problem->addKernel("HHPFCRFF", "HH3_" + imag_name, poly_params);
135  }
136  }
137 }
T & set(const std::string &name, bool quiet_mode=false)
InputParameters getValidParams(const std::string &name) const
Factory & _factory
std::string stringify(const T &t)
std::shared_ptr< FEProblemBase > & _problem

◆ validParams()

InputParameters HHPFCRFFSplitKernelAction::validParams ( )
static

Definition at line 18 of file HHPFCRFFSplitKernelAction.C.

Referenced by PFCRFFKernelAction::validParams().

19 {
21  params.addClassDescription(
22  "Set up kernels for the rational function fit (RFF) phase field crystal model");
23  params.addRequiredParam<unsigned int>(
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");
32  params.addParam<Real>(
33  "n_exp_terms", 4, "Number of terms used in the Taylor expansion of the natural log term");
34  params.addParam<bool>(
35  "use_displaced_mesh", false, "Whether to use displaced mesh in the kernels");
36  return params;
37 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _L_name_base

const std::string HHPFCRFFSplitKernelAction::_L_name_base
protected

Definition at line 25 of file HHPFCRFFSplitKernelAction.h.

Referenced by act(), and PFCRFFKernelAction::act().

◆ _n_name

const VariableName HHPFCRFFSplitKernelAction::_n_name
protected

Definition at line 26 of file HHPFCRFFSplitKernelAction.h.

Referenced by act(), and PFCRFFKernelAction::act().

◆ _num_L

const unsigned int HHPFCRFFSplitKernelAction::_num_L
protected

Definition at line 24 of file HHPFCRFFSplitKernelAction.h.

Referenced by act(), and PFCRFFKernelAction::act().


The documentation for this class was generated from the following files: