www.mooseframework.org
PolycrystalVoronoiVoidIC.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 POLYCRYSTALVORONOIVOIDIC_H
8 #define POLYCRYSTALVORONOIVOIDIC_H
9 
10 #include "MultiSmoothCircleIC.h"
11 #include "MooseRandom.h"
12 #include "PolycrystalICTools.h"
13 
14 // Forward Declarationsc
16 
17 template <>
19 
25 {
26 public:
27  PolycrystalVoronoiVoidIC(const InputParameters & parameters);
28 
29  virtual void initialSetup() override;
30 
31  static InputParameters actionParameters();
32 
33 protected:
34  const MooseEnum _structure_type;
35 
36  const unsigned int _op_num;
37  const unsigned int _grain_num;
38  const unsigned int _op_index;
39 
40  const unsigned int _rand_seed;
41 
42  const bool _columnar_3D;
43 
44  virtual void computeCircleCenters() override;
45 
46  virtual Real value(const Point & p) override;
47  virtual RealGradient gradient(const Point & p) override;
48 
49  virtual Real grainValueCalc(const Point & p);
50  virtual void computeGrainCenters();
51 
52  std::vector<Point> _centerpoints;
53  std::vector<unsigned int> _assigned_op;
54 
57  {
58  Real d;
59  unsigned int gr;
60  };
61 
64  {
65  bool operator()(const DistancePoint & a, const DistancePoint & b) { return a.d < b.d; }
66  } _customLess;
67 };
68 
69 #endif // POLYCRYSTALVORONOIVOIDIC_H
Sorts the temp_centerpoints into order of magnitude.
struct PolycrystalVoronoiVoidIC::DistancePointComparator _customLess
std::vector< Point > _centerpoints
PolycrystalVoronoiVoidIC initializes either grain or void values for a voronoi tesselation with voids...
virtual Real value(const Point &p) override
bool operator()(const DistancePoint &a, const DistancePoint &b)
InputParameters validParams< PolycrystalVoronoiVoidIC >()
PolycrystalVoronoiVoidIC(const InputParameters &parameters)
virtual Real grainValueCalc(const Point &p)
virtual RealGradient gradient(const Point &p) override
static InputParameters actionParameters()
virtual void computeCircleCenters() override
MultismoothCircleIC creates multiple SmoothCircles (number = numbub) that are randomly positioned aro...
virtual void initialSetup() override
std::vector< unsigned int > _assigned_op