www.mooseframework.org
PolycrystalVoronoi.h
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 #ifndef POLYCRYSTALVORONOI_H
8 #define POLYCRYSTALVORONOI_H
9 
11 
12 // Forward Declarations
13 class PolycrystalVoronoi;
14 
15 template <>
16 InputParameters validParams<PolycrystalVoronoi>();
17 
19 {
20 public:
21  PolycrystalVoronoi(const InputParameters & parameters);
22 
23  virtual void precomputeGrainStructure() override;
24  virtual void getGrainsBasedOnPoint(const Point & point,
25  std::vector<unsigned int> & grains) const override;
26  virtual Real getVariableValue(unsigned int op_index, const Point & p) const override;
27 
28  virtual unsigned int getNumGrains() const override { return _grain_num; }
29 
30 protected:
32  const unsigned int _grain_num;
33 
34  const bool _columnar_3D;
35 
36  const unsigned int _rand_seed;
37 
38  Point _bottom_left;
39  Point _top_right;
40  Point _range;
41 
42  std::vector<Point> _centerpoints;
43 };
44 
45 #endif // POLYCRYSTALVORONOI_H
const unsigned int _grain_num
The number of grains to create.
virtual Real getVariableValue(unsigned int op_index, const Point &p) const override
Returns the variable value for a given op_index and mesh point.
std::vector< Point > _centerpoints
This object provides the base capability for creating proper polycrystal ICs.
InputParameters validParams< PolycrystalVoronoi >()
PolycrystalVoronoi(const InputParameters &parameters)
virtual void getGrainsBasedOnPoint(const Point &point, std::vector< unsigned int > &grains) const override
Method for retrieving active grain IDs based on some point in the mesh.
virtual void precomputeGrainStructure() override
This callback is triggered after the object is initialized and may be optionally overridden to do pre...
virtual unsigned int getNumGrains() const override
Must be overridden by the deriving class to provide the number of grains in the polycrystal structure...
const unsigned int _rand_seed