www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
PolycrystalVoronoiVoidICAction Class Reference

Sets up a polycrystal initial condition with voids on grain boundaries for all order parameters. More...

#include <PolycrystalVoronoiVoidICAction.h>

Inheritance diagram for PolycrystalVoronoiVoidICAction:
[legend]

Public Member Functions

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

Protected Attributes

const unsigned int _op_num
 
const std::string _var_name_base
 

Detailed Description

Sets up a polycrystal initial condition with voids on grain boundaries for all order parameters.

Definition at line 17 of file PolycrystalVoronoiVoidICAction.h.

Constructor & Destructor Documentation

PolycrystalVoronoiVoidICAction::PolycrystalVoronoiVoidICAction ( const InputParameters &  params)

Definition at line 25 of file PolycrystalVoronoiVoidICAction.C.

26  : Action(params),
27  _op_num(getParam<unsigned int>("op_num")),
28  _var_name_base(getParam<std::string>("var_name_base"))
29 {
30 }

Member Function Documentation

void PolycrystalVoronoiVoidICAction::act ( )
virtual

Definition at line 33 of file PolycrystalVoronoiVoidICAction.C.

34 {
35  // Loop through the number of order parameters
36  for (unsigned int op = 0; op < _op_num; op++)
37  {
38  // Set parameters for BoundingBoxIC
39  InputParameters poly_params = _factory.getValidParams("PolycrystalVoronoiVoidIC");
40  poly_params.applyParameters(parameters());
41  poly_params.set<unsigned int>("op_index") = op;
42  poly_params.set<VariableName>("variable") = _var_name_base + Moose::stringify(op);
43  poly_params.set<MooseEnum>("structure_type") = "grains";
44 
45  // Add initial condition
46  _problem->addInitialCondition(
47  "PolycrystalVoronoiVoidIC", name() + "_" + Moose::stringify(op), poly_params);
48  }
49 }

Member Data Documentation

const unsigned int PolycrystalVoronoiVoidICAction::_op_num
protected

Definition at line 25 of file PolycrystalVoronoiVoidICAction.h.

Referenced by act().

const std::string PolycrystalVoronoiVoidICAction::_var_name_base
protected

Definition at line 26 of file PolycrystalVoronoiVoidICAction.h.

Referenced by act().


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