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
 
const FileName _file_name
 

Detailed Description

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

Definition at line 20 of file PolycrystalVoronoiVoidICAction.h.

Constructor & Destructor Documentation

◆ PolycrystalVoronoiVoidICAction()

PolycrystalVoronoiVoidICAction::PolycrystalVoronoiVoidICAction ( const InputParameters &  params)

Definition at line 34 of file PolycrystalVoronoiVoidICAction.C.

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

Member Function Documentation

◆ act()

void PolycrystalVoronoiVoidICAction::act ( )
virtual

Definition at line 43 of file PolycrystalVoronoiVoidICAction.C.

44 {
45  // Loop through the number of order parameters
46  for (unsigned int op = 0; op < _op_num; op++)
47  {
48  // Set parameters for BoundingBoxIC
49  InputParameters poly_params = _factory.getValidParams("PolycrystalVoronoiVoidIC");
50  poly_params.applyParameters(parameters());
51  poly_params.set<unsigned int>("op_index") = op;
52  poly_params.set<VariableName>("variable") = _var_name_base + Moose::stringify(op);
53  poly_params.set<MooseEnum>("structure_type") = "grains";
54 
55  // Add initial condition
56  _problem->addInitialCondition(
57  "PolycrystalVoronoiVoidIC", name() + "_" + Moose::stringify(op), poly_params);
58  }
59 }
const std::string name
Definition: Setup.h:22

Member Data Documentation

◆ _file_name

const FileName PolycrystalVoronoiVoidICAction::_file_name
protected

Definition at line 30 of file PolycrystalVoronoiVoidICAction.h.

◆ _op_num

const unsigned int PolycrystalVoronoiVoidICAction::_op_num
protected

Definition at line 28 of file PolycrystalVoronoiVoidICAction.h.

Referenced by act().

◆ _var_name_base

const std::string PolycrystalVoronoiVoidICAction::_var_name_base
protected

Definition at line 29 of file PolycrystalVoronoiVoidICAction.h.

Referenced by act().


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