www.mooseframework.org
SmoothSuperellipsoidBaseIC.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 SMOOTHSUPERELLIPSOIDBASEIC_H
8 #define SMOOTHSUPERELLIPSOIDBASEIC_H
9 
10 #include "InitialCondition.h"
11 #include "MooseRandom.h"
12 
13 // Forward Declarations
15 
16 template <>
18 
26 class SmoothSuperellipsoidBaseIC : public InitialCondition
27 {
28 public:
29  SmoothSuperellipsoidBaseIC(const InputParameters & parameters);
30 
31  virtual Real value(const Point & p);
32  virtual RealGradient gradient(const Point & p);
33 
34  virtual void initialSetup();
35 
36 protected:
37  virtual Real
38  computeSuperellipsoidValue(const Point & p, const Point & center, Real a, Real b, Real c, Real n);
40  const Point & p, const Point & center, Real a, Real b, Real c, Real n);
41  RealGradient computeSuperellipsoidGradient(
42  const Point & p, const Point & center, Real a, Real b, Real c, Real n);
43 
44  virtual void computeSuperellipsoidSemiaxes() = 0;
45  virtual void computeSuperellipsoidExponents() = 0;
46  virtual void computeSuperellipsoidCenters() = 0;
47 
48  MooseMesh & _mesh;
49 
50  Real _invalue;
51  Real _outvalue;
53  Real _int_width;
55 
56  unsigned int _num_dim;
57 
58  std::vector<Point> _centers;
59  std::vector<Real> _as;
60  std::vector<Real> _bs;
61  std::vector<Real> _cs;
62  std::vector<Real> _ns;
63 
64  MooseRandom _random;
65 };
66 
67 #endif // SMOOTHSUPERELLIPSOIDBASEIC_H
virtual RealGradient gradient(const Point &p)
virtual void computeSuperellipsoidSemiaxes()=0
virtual Real value(const Point &p)
SmoothSuperellipsoidBaseIC is the base class for all initial conditions that create superellipsoids...
InputParameters validParams< SmoothSuperellipsoidBaseIC >()
RealGradient computeSuperellipsoidGradient(const Point &p, const Point &center, Real a, Real b, Real c, Real n)
virtual Real computeSuperellipsoidValue(const Point &p, const Point &center, Real a, Real b, Real c, Real n)
virtual Real computeSuperellipsoidInverseValue(const Point &p, const Point &center, Real a, Real b, Real c, Real n)
virtual void computeSuperellipsoidCenters()=0
virtual void computeSuperellipsoidExponents()=0
SmoothSuperellipsoidBaseIC(const InputParameters &parameters)