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

Bicrystal using a bounding box. More...

#include <BicrystalBoundingBoxICAction.h>

Inheritance diagram for BicrystalBoundingBoxICAction:
[legend]

Public Member Functions

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

Private Attributes

const std::string _var_name_base
 
const unsigned int _op_num
 

Detailed Description

Bicrystal using a bounding box.

Definition at line 16 of file BicrystalBoundingBoxICAction.h.

Constructor & Destructor Documentation

BicrystalBoundingBoxICAction::BicrystalBoundingBoxICAction ( const InputParameters &  params)

Definition at line 29 of file BicrystalBoundingBoxICAction.C.

30  : Action(params),
31  _var_name_base(getParam<std::string>("var_name_base")),
32  _op_num(getParam<unsigned int>("op_num"))
33 {
34  if (_op_num != 2)
35  mooseError("op_num must equal 2 for bicrystal ICs");
36 }

Member Function Documentation

void BicrystalBoundingBoxICAction::act ( )
virtual

Definition at line 39 of file BicrystalBoundingBoxICAction.C.

40 {
41 #ifdef DEBUG
42  Moose::err << "Inside the BicrystalBoundingBoxICAction Object\n";
43 #endif
44 
45  // Loop through the number of order parameters
46  for (unsigned int op = 0; op < _op_num; ++op)
47  {
48  // Create variable names
49  const std::string var_name = _var_name_base + Moose::stringify(op);
50 
51  // Set parameters for BoundingBoxIC
52  InputParameters poly_params = _factory.getValidParams("BoundingBoxIC");
53  poly_params.applyParameters(parameters());
54  poly_params.set<VariableName>("variable") = var_name;
55  if (op == 0)
56  {
57  // Values for bounding box
58  poly_params.set<Real>("inside") = 1.0;
59  poly_params.set<Real>("outside") = 0.0;
60  }
61  else
62  {
63  // Values for matrix grain
64  poly_params.set<Real>("inside") = 0.0;
65  poly_params.set<Real>("outside") = 1.0;
66  }
67 
68  // Add initial condition
69  _problem->addInitialCondition(
70  "BoundingBoxIC", "BicrystalBoundingBoxIC_" + Moose::stringify(op), poly_params);
71  }
72 }

Member Data Documentation

const unsigned int BicrystalBoundingBoxICAction::_op_num
private

Definition at line 25 of file BicrystalBoundingBoxICAction.h.

Referenced by act(), and BicrystalBoundingBoxICAction().

const std::string BicrystalBoundingBoxICAction::_var_name_base
private

Definition at line 24 of file BicrystalBoundingBoxICAction.h.

Referenced by act().


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