www.mooseframework.org
Public Member Functions | Private Attributes | List of all members
HHPFCRFFSplitVariablesAction Class Reference

Automatically generates all the L variables for the RFF phase field crystal model. More...

#include <HHPFCRFFSplitVariablesAction.h>

Inheritance diagram for HHPFCRFFSplitVariablesAction:
[legend]

Public Member Functions

 HHPFCRFFSplitVariablesAction (const InputParameters &params)
 
virtual void act ()
 

Private Attributes

const unsigned int _num_L
 
const std::string _L_name_base
 

Detailed Description

Automatically generates all the L variables for the RFF phase field crystal model.

Definition at line 24 of file HHPFCRFFSplitVariablesAction.h.

Constructor & Destructor Documentation

◆ HHPFCRFFSplitVariablesAction()

HHPFCRFFSplitVariablesAction::HHPFCRFFSplitVariablesAction ( const InputParameters &  params)

Definition at line 42 of file HHPFCRFFSplitVariablesAction.C.

43  : Action(params),
44  _num_L(getParam<unsigned int>("num_L")),
45  _L_name_base(getParam<std::string>("L_name_base"))
46 {
47 }

Member Function Documentation

◆ act()

void HHPFCRFFSplitVariablesAction::act ( )
virtual

Definition at line 50 of file HHPFCRFFSplitVariablesAction.C.

51 {
52 #ifdef DEBUG
53  Moose::err << "Inside the HHPFCRFFSplitVariablesAction Object\n";
54  Moose::err << "VariableBase: " << _L_name_base << "\torder: " << getParam<MooseEnum>("order")
55  << "\tfamily: " << getParam<MooseEnum>("family") << std::endl;
56 #endif
57 
58  // Loop through the number of L variables
59  for (unsigned int l = 0; l < _num_L; ++l)
60  {
61  // Create L base name
62  std::string L_name = _L_name_base + Moose::stringify(l);
63 
64  // Create real L variable
65  std::string real_name = L_name + "_real";
66 
67  _problem->addVariable(real_name,
68  FEType(Utility::string_to_enum<Order>(getParam<MooseEnum>("order")),
69  Utility::string_to_enum<FEFamily>(getParam<MooseEnum>("family"))),
70  getParam<Real>("scaling"));
71 
72  if (l > 0)
73  {
74  // Create imaginary L variable IF l > 0
75  std::string imag_name = L_name + "_imag";
76 
77  _problem->addVariable(
78  imag_name,
79  FEType(Utility::string_to_enum<Order>(getParam<MooseEnum>("order")),
80  Utility::string_to_enum<FEFamily>(getParam<MooseEnum>("family"))),
81  getParam<Real>("scaling"));
82  }
83  }
84 }

Member Data Documentation

◆ _L_name_base

const std::string HHPFCRFFSplitVariablesAction::_L_name_base
private

Definition at line 33 of file HHPFCRFFSplitVariablesAction.h.

Referenced by act().

◆ _num_L

const unsigned int HHPFCRFFSplitVariablesAction::_num_L
private

Definition at line 32 of file HHPFCRFFSplitVariablesAction.h.

Referenced by act().


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