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

Constructor & Destructor Documentation

◆ PFCRFFVariablesAction()

PFCRFFVariablesAction::PFCRFFVariablesAction ( const InputParameters &  params)

Definition at line 43 of file PFCRFFVariablesAction.C.

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

Member Function Documentation

◆ act()

void PFCRFFVariablesAction::act ( )
virtual

Definition at line 51 of file PFCRFFVariablesAction.C.

52 {
53 #ifdef DEBUG
54  Moose::err << "Inside the PFCRFFVariablesAction Object\n";
55  Moose::err << "VariableBase: " << _L_name_base << "\torder: " << getParam<MooseEnum>("order")
56  << "\tfamily: " << getParam<MooseEnum>("family") << std::endl;
57 #endif
58 
59  // Loop through the number of L variables
60  for (unsigned int l = 0; l < _num_L; ++l)
61  {
62  // Create L base name
63  std::string L_name = _L_name_base + Moose::stringify(l);
64 
65  // Create real L variable
66  const std::string real_name = L_name + "_real";
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  _problem->addVariable(
77  imag_name,
78  FEType(Utility::string_to_enum<Order>(getParam<MooseEnum>("order")),
79  Utility::string_to_enum<FEFamily>(getParam<MooseEnum>("family"))),
80  getParam<Real>("scaling"));
81  }
82  }
83 }
const std::string _L_name_base
const unsigned int _num_L

Member Data Documentation

◆ _L_name_base

const std::string PFCRFFVariablesAction::_L_name_base
private

Definition at line 34 of file PFCRFFVariablesAction.h.

Referenced by act().

◆ _num_L

const unsigned int PFCRFFVariablesAction::_num_L
private

Definition at line 33 of file PFCRFFVariablesAction.h.

Referenced by act().


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