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

Automatically generates all variables to model a polycrystal with op_num orderparameters. More...

#include <PolycrystalVariablesAction.h>

Inheritance diagram for PolycrystalVariablesAction:
[legend]

Public Member Functions

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

Private Attributes

const unsigned int _op_num
 
const std::string _var_name_base
 

Detailed Description

Automatically generates all variables to model a polycrystal with op_num orderparameters.

Definition at line 19 of file PolycrystalVariablesAction.h.

Constructor & Destructor Documentation

PolycrystalVariablesAction::PolycrystalVariablesAction ( const InputParameters &  params)

Definition at line 39 of file PolycrystalVariablesAction.C.

40  : Action(params),
41  _op_num(getParam<unsigned int>("op_num")),
42  _var_name_base(getParam<std::string>("var_name_base"))
43 {
44 }

Member Function Documentation

void PolycrystalVariablesAction::act ( )
virtual

Definition at line 47 of file PolycrystalVariablesAction.C.

48 {
49  // Loop through the number of order parameters
50  for (unsigned int op = 0; op < _op_num; op++)
51  {
52  // Create variable names
53  std::string var_name = _var_name_base + Moose::stringify(op);
54 
55  // Add the variable
56  _problem->addVariable(var_name,
57  FEType(Utility::string_to_enum<Order>(getParam<MooseEnum>("order")),
58  Utility::string_to_enum<FEFamily>(getParam<MooseEnum>("family"))),
59  getParam<Real>("scaling"));
60  }
61 }

Member Data Documentation

const unsigned int PolycrystalVariablesAction::_op_num
private

Definition at line 27 of file PolycrystalVariablesAction.h.

Referenced by act().

const std::string PolycrystalVariablesAction::_var_name_base
private

Definition at line 28 of file PolycrystalVariablesAction.h.

Referenced by act().


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