www.mooseframework.org
PolycrystalColoringIC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "PolycrystalColoringIC.h"
11 #include "IndirectSort.h"
12 #include "MooseMesh.h"
13 #include "MooseRandom.h"
14 #include "NonlinearSystemBase.h"
15 #include "GrainTrackerInterface.h"
17 
19 
22 {
24  params.addClassDescription(
25  "Random Voronoi tesselation polycrystal (used by PolycrystalVoronoiICAction)");
26  params.addRequiredParam<UserObjectName>("polycrystal_ic_uo",
27  "User object generating a point to grain number mapping");
28  params.addRequiredParam<unsigned int>("op_index", "The index for the current order parameter");
29 
30  return params;
31 }
32 
34  : InitialCondition(parameters),
35  _op_index(getParam<unsigned int>("op_index")),
36  _poly_ic_uo(getUserObject<PolycrystalUserObjectBase>("polycrystal_ic_uo"))
37 {
38 }
39 
40 Real
42 {
43  if (_current_node)
45  else
47 }
virtual Real getVariableValue(unsigned int op_index, const Point &p) const =0
Returns the variable value for a given op_index and mesh point.
static InputParameters validParams()
This object provides the base capability for creating proper polycrystal ICs.
registerMooseObject("PhaseFieldApp", PolycrystalColoringIC)
PolycrystalColoringIC creates a polycrystal initial condition.
void addRequiredParam(const std::string &name, const std::string &doc_string)
const Node * _current_node
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
PolycrystalColoringIC(const InputParameters &parameters)
virtual Real value(const Point &p) override
void addClassDescription(const std::string &doc_string)
const PolycrystalUserObjectBase & _poly_ic_uo
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...
void ErrorVector unsigned int