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 16 of file HHPFCRFFSplitVariablesAction.h.

Constructor & Destructor Documentation

HHPFCRFFSplitVariablesAction::HHPFCRFFSplitVariablesAction ( const InputParameters &  params)

Definition at line 32 of file HHPFCRFFSplitVariablesAction.C.

33  : Action(params),
34  _num_L(getParam<unsigned int>("num_L")),
35  _L_name_base(getParam<std::string>("L_name_base"))
36 {
37 }

Member Function Documentation

void HHPFCRFFSplitVariablesAction::act ( )
virtual

Definition at line 40 of file HHPFCRFFSplitVariablesAction.C.

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

Member Data Documentation

const std::string HHPFCRFFSplitVariablesAction::_L_name_base
private

Definition at line 25 of file HHPFCRFFSplitVariablesAction.h.

Referenced by act().

const unsigned int HHPFCRFFSplitVariablesAction::_num_L
private

Definition at line 24 of file HHPFCRFFSplitVariablesAction.h.

Referenced by act().


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