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

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

#include <PolycrystalRandomICAction.h>

Inheritance diagram for PolycrystalRandomICAction:
[legend]

Public Member Functions

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

Private Attributes

const unsigned int _op_num
 
const std::string _var_name_base
 
const MooseEnum _random_type
 

Detailed Description

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

Definition at line 17 of file PolycrystalRandomICAction.h.

Constructor & Destructor Documentation

PolycrystalRandomICAction::PolycrystalRandomICAction ( const InputParameters &  params)

Definition at line 29 of file PolycrystalRandomICAction.C.

30  : Action(params),
31  _op_num(getParam<unsigned int>("op_num")),
32  _var_name_base(getParam<std::string>("var_name_base")),
33  _random_type(getParam<MooseEnum>("random_type"))
34 {
35 }

Member Function Documentation

void PolycrystalRandomICAction::act ( )
virtual

Definition at line 38 of file PolycrystalRandomICAction.C.

39 {
40 #ifdef DEBUG
41  Moose::err << "Inside the PolycrystalRandomICAction Object\n";
42 #endif
43 
44  // Loop through the number of order parameters
45  for (unsigned int op = 0; op < _op_num; op++)
46  {
47  // Set parameters for BoundingBoxIC
48  InputParameters poly_params = _factory.getValidParams("PolycrystalRandomIC");
49  poly_params.set<VariableName>("variable") = _var_name_base + Moose::stringify(op);
50  poly_params.set<unsigned int>("op_num") = _op_num;
51  poly_params.set<unsigned int>("op_index") = op;
52  poly_params.set<unsigned int>("typ") = _random_type;
53 
54  // Add initial condition
55  _problem->addInitialCondition("PolycrystalRandomIC",
56  "ICs/PolycrystalICs/PolycrystalRandomIC_" + Moose::stringify(op),
57  poly_params);
58  }
59 }

Member Data Documentation

const unsigned int PolycrystalRandomICAction::_op_num
private

Definition at line 25 of file PolycrystalRandomICAction.h.

Referenced by act().

const MooseEnum PolycrystalRandomICAction::_random_type
private

Definition at line 27 of file PolycrystalRandomICAction.h.

Referenced by act().

const std::string PolycrystalRandomICAction::_var_name_base
private

Definition at line 26 of file PolycrystalRandomICAction.h.

Referenced by act().


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