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

Bicrystal with a circular grain and an embedding outer grain. More...

#include <BicrystalCircleGrainICAction.h>

Inheritance diagram for BicrystalCircleGrainICAction:
[legend]

Public Member Functions

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

Private Attributes

const std::string _var_name_base
 
const unsigned int _op_num
 
const Real _radius
 
const Real _x
 
const Real _y
 
const Real _z
 
const Real _int_width
 
const bool _3D_sphere
 

Detailed Description

Bicrystal with a circular grain and an embedding outer grain.

Definition at line 16 of file BicrystalCircleGrainICAction.h.

Constructor & Destructor Documentation

BicrystalCircleGrainICAction::BicrystalCircleGrainICAction ( const InputParameters &  params)

Definition at line 31 of file BicrystalCircleGrainICAction.C.

32  : Action(params),
33  _var_name_base(getParam<std::string>("var_name_base")),
34  _op_num(getParam<unsigned int>("op_num")),
35  _radius(getParam<Real>("radius")),
36  _x(getParam<Real>("x")),
37  _y(getParam<Real>("y")),
38  _z(getParam<Real>("z")),
39  _int_width(getParam<Real>("int_width")),
40  _3D_sphere(getParam<bool>("3D_sphere"))
41 {
42  if (_op_num != 2)
43  mooseError("op_num must equal 2 for bicrystal ICs");
44 }

Member Function Documentation

void BicrystalCircleGrainICAction::act ( )
virtual

Definition at line 47 of file BicrystalCircleGrainICAction.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  // Set parameters for SmoothCircleIC
56  InputParameters poly_params = _factory.getValidParams("SmoothCircleIC");
57  poly_params.set<VariableName>("variable") = var_name;
58  poly_params.set<Real>("x1") = _x;
59  poly_params.set<Real>("y1") = _y;
60  poly_params.set<Real>("z1") = _z;
61  poly_params.set<Real>("radius") = _radius;
62  poly_params.set<Real>("int_width") = _int_width;
63  poly_params.set<bool>("3D_spheres") = _3D_sphere;
64  if (op == 0)
65  {
66  // Values for circle grain
67  poly_params.set<Real>("invalue") = 1.0;
68  poly_params.set<Real>("outvalue") = 0.0;
69  }
70  else
71  {
72  // Values for matrix grain
73  poly_params.set<Real>("invalue") = 0.0;
74  poly_params.set<Real>("outvalue") = 1.0;
75  }
76 
77  // Add initial condition
78  _problem->addInitialCondition(
79  "SmoothCircleIC", "BicrystalCircleGrainIC_" + Moose::stringify(op), poly_params);
80  }
81 }

Member Data Documentation

const bool BicrystalCircleGrainICAction::_3D_sphere
private

Definition at line 31 of file BicrystalCircleGrainICAction.h.

Referenced by act().

const Real BicrystalCircleGrainICAction::_int_width
private

Definition at line 29 of file BicrystalCircleGrainICAction.h.

Referenced by act().

const unsigned int BicrystalCircleGrainICAction::_op_num
private

Definition at line 25 of file BicrystalCircleGrainICAction.h.

Referenced by act(), and BicrystalCircleGrainICAction().

const Real BicrystalCircleGrainICAction::_radius
private

Definition at line 27 of file BicrystalCircleGrainICAction.h.

Referenced by act().

const std::string BicrystalCircleGrainICAction::_var_name_base
private

Definition at line 24 of file BicrystalCircleGrainICAction.h.

Referenced by act().

const Real BicrystalCircleGrainICAction::_x
private

Definition at line 28 of file BicrystalCircleGrainICAction.h.

Referenced by act().

const Real BicrystalCircleGrainICAction::_y
private

Definition at line 28 of file BicrystalCircleGrainICAction.h.

Referenced by act().

const Real BicrystalCircleGrainICAction::_z
private

Definition at line 28 of file BicrystalCircleGrainICAction.h.

Referenced by act().


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