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

Automatically generates all variables to model a polycrystal with op_num orderparameters. More...

#include <Tricrystal2CircleGrainsICAction.h>

Inheritance diagram for Tricrystal2CircleGrainsICAction:
[legend]

Public Member Functions

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

Private Attributes

std::string _var_name_base
 
unsigned int _op_num
 

Static Private Attributes

static const Real _abs_zero_tol = 1e-12
 

Detailed Description

Automatically generates all variables to model a polycrystal with op_num orderparameters.

Definition at line 19 of file Tricrystal2CircleGrainsICAction.h.

Constructor & Destructor Documentation

◆ Tricrystal2CircleGrainsICAction()

Tricrystal2CircleGrainsICAction::Tricrystal2CircleGrainsICAction ( const InputParameters &  params)

Definition at line 41 of file Tricrystal2CircleGrainsICAction.C.

42  : Action(params),
43  _var_name_base(getParam<std::string>("var_name_base")),
44  _op_num(getParam<unsigned int>("op_num"))
45 {
46 }

Member Function Documentation

◆ act()

void Tricrystal2CircleGrainsICAction::act ( )
virtual

Definition at line 49 of file Tricrystal2CircleGrainsICAction.C.

50 {
51 #ifdef DEBUG
52  Moose::err << "Inside the Tricrystal2CircleGrainsICAction Object\n";
53 #endif
54 
55  // Loop through the number of order parameters
56  for (unsigned int op = 0; op < _op_num; op++)
57  {
58  // Create variable names
59  std::string var_name = _var_name_base;
60  std::stringstream out;
61  out << op;
62  var_name.append(out.str());
63 
64  // Set parameters for BoundingBoxIC
65  InputParameters poly_params = _factory.getValidParams("Tricrystal2CircleGrainsIC");
66  poly_params.set<VariableName>("variable") = var_name;
67  poly_params.set<unsigned int>("op_num") = _op_num;
68  poly_params.set<unsigned int>("op_index") = op;
69 
70  // Add initial condition
71  _problem->addInitialCondition("Tricrystal2CircleGrainsIC",
72  "Tricrystal2CircleGrainsIC_" + Moose::stringify(op),
73  poly_params);
74  }
75 }

Member Data Documentation

◆ _abs_zero_tol

const Real Tricrystal2CircleGrainsICAction::_abs_zero_tol = 1e-12
staticprivate

Definition at line 27 of file Tricrystal2CircleGrainsICAction.h.

◆ _op_num

unsigned int Tricrystal2CircleGrainsICAction::_op_num
private

Definition at line 30 of file Tricrystal2CircleGrainsICAction.h.

Referenced by act().

◆ _var_name_base

std::string Tricrystal2CircleGrainsICAction::_var_name_base
private

Definition at line 29 of file Tricrystal2CircleGrainsICAction.h.

Referenced by act().


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