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 16 of file Tricrystal2CircleGrainsICAction.h.

Constructor & Destructor Documentation

Tricrystal2CircleGrainsICAction::Tricrystal2CircleGrainsICAction ( const InputParameters &  params)

Definition at line 36 of file Tricrystal2CircleGrainsICAction.C.

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

Member Function Documentation

void Tricrystal2CircleGrainsICAction::act ( )
virtual

Definition at line 44 of file Tricrystal2CircleGrainsICAction.C.

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

Member Data Documentation

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

Definition at line 24 of file Tricrystal2CircleGrainsICAction.h.

unsigned int Tricrystal2CircleGrainsICAction::_op_num
private

Definition at line 27 of file Tricrystal2CircleGrainsICAction.h.

Referenced by act().

std::string Tricrystal2CircleGrainsICAction::_var_name_base
private

Definition at line 26 of file Tricrystal2CircleGrainsICAction.h.

Referenced by act().


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