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 20 of file PolycrystalRandomICAction.h.

Constructor & Destructor Documentation

◆ PolycrystalRandomICAction()

PolycrystalRandomICAction::PolycrystalRandomICAction ( const InputParameters &  params)

Definition at line 34 of file PolycrystalRandomICAction.C.

35  : Action(params),
36  _op_num(getParam<unsigned int>("op_num")),
37  _var_name_base(getParam<std::string>("var_name_base")),
38  _random_type(getParam<MooseEnum>("random_type"))
39 {
40 }

Member Function Documentation

◆ act()

void PolycrystalRandomICAction::act ( )
virtual

Definition at line 43 of file PolycrystalRandomICAction.C.

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

Member Data Documentation

◆ _op_num

const unsigned int PolycrystalRandomICAction::_op_num
private

Definition at line 28 of file PolycrystalRandomICAction.h.

Referenced by act().

◆ _random_type

const MooseEnum PolycrystalRandomICAction::_random_type
private

Definition at line 30 of file PolycrystalRandomICAction.h.

Referenced by act().

◆ _var_name_base

const std::string PolycrystalRandomICAction::_var_name_base
private

Definition at line 29 of file PolycrystalRandomICAction.h.

Referenced by act().


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