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

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

#include <PFCRFFVariablesAction.h>

Inheritance diagram for PFCRFFVariablesAction:
[legend]

Public Member Functions

 PFCRFFVariablesAction (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 23 of file PFCRFFVariablesAction.h.

Constructor & Destructor Documentation

PFCRFFVariablesAction::PFCRFFVariablesAction ( const InputParameters &  params)

Definition at line 39 of file PFCRFFVariablesAction.C.

40  : Action(params),
41  _num_L(getParam<unsigned int>("num_L")),
42  _L_name_base(getParam<std::string>("L_name_base"))
43 {
44 }
const std::string _L_name_base
const unsigned int _num_L

Member Function Documentation

void PFCRFFVariablesAction::act ( )
virtual

Definition at line 47 of file PFCRFFVariablesAction.C.

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

Member Data Documentation

const std::string PFCRFFVariablesAction::_L_name_base
private

Definition at line 32 of file PFCRFFVariablesAction.h.

Referenced by act().

const unsigned int PFCRFFVariablesAction::_num_L
private

Definition at line 31 of file PFCRFFVariablesAction.h.

Referenced by act().


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