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 18 of file BicrystalBoundingBoxICAction.h.

Constructor & Destructor Documentation

◆ BicrystalBoundingBoxICAction()

BicrystalBoundingBoxICAction::BicrystalBoundingBoxICAction ( const InputParameters &  params)

Definition at line 35 of file BicrystalBoundingBoxICAction.C.

36  : Action(params),
37  _var_name_base(getParam<std::string>("var_name_base")),
38  _op_num(getParam<unsigned int>("op_num"))
39 {
40  if (_op_num != 2)
41  paramError("op_num", "Must equal 2 for bicrystal ICs");
42 }

Member Function Documentation

◆ act()

void BicrystalBoundingBoxICAction::act ( )
virtual

Definition at line 45 of file BicrystalBoundingBoxICAction.C.

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

Member Data Documentation

◆ _op_num

const unsigned int BicrystalBoundingBoxICAction::_op_num
private

Definition at line 27 of file BicrystalBoundingBoxICAction.h.

Referenced by act(), and BicrystalBoundingBoxICAction().

◆ _var_name_base

const std::string BicrystalBoundingBoxICAction::_var_name_base
private

Definition at line 26 of file BicrystalBoundingBoxICAction.h.

Referenced by act().


The documentation for this class was generated from the following files:
BicrystalBoundingBoxICAction::_var_name_base
const std::string _var_name_base
Definition: BicrystalBoundingBoxICAction.h:26
BicrystalBoundingBoxICAction::_op_num
const unsigned int _op_num
Definition: BicrystalBoundingBoxICAction.h:27