www.mooseframework.org
PolycrystalColoringIC.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
9 #include "IndirectSort.h"
10 #include "MooseMesh.h"
11 #include "MooseRandom.h"
12 #include "NonlinearSystemBase.h"
13 #include "GrainTrackerInterface.h"
15 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<InitialCondition>();
21  params.addClassDescription(
22  "Random Voronoi tesselation polycrystal (used by PolycrystalVoronoiICAction)");
23  params.addRequiredParam<UserObjectName>("polycrystal_ic_uo", "TODO");
24  params.addRequiredParam<unsigned int>("op_index", "The index for the current order parameter");
25 
26  return params;
27 }
28 
29 PolycrystalColoringIC::PolycrystalColoringIC(const InputParameters & parameters)
30  : InitialCondition(parameters),
31  _op_index(getParam<unsigned int>("op_index")),
32  _poly_ic_uo(getUserObject<PolycrystalUserObjectBase>("polycrystal_ic_uo"))
33 {
34 }
35 
36 Real
38 {
39  if (_current_node)
40  return _poly_ic_uo.getNodalVariableValue(_op_index, *_current_node);
41  else
43 }
InputParameters validParams< PolycrystalColoringIC >()
virtual Real getNodalVariableValue(unsigned int op_index, const Node &n) const
Similarly to the getVariableValue method, this method also returns values but may be optimized for re...
This object provides the base capability for creating proper polycrystal ICs.
virtual Real getVariableValue(unsigned int op_index, const Point &p) const =0
Returns the variable value for a given op_index and mesh point.
PolycrystalColoringIC(const InputParameters &parameters)
virtual Real value(const Point &p) override
const PolycrystalUserObjectBase & _poly_ic_uo