www.mooseframework.org
SmoothSuperellipsoidBaseIC.h
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 #pragma once
11 
12 #include "InitialCondition.h"
13 #include "MooseRandom.h"
14 
15 // Forward Declarations
17 
18 template <>
20 
28 class SmoothSuperellipsoidBaseIC : public InitialCondition
29 {
30 public:
31  SmoothSuperellipsoidBaseIC(const InputParameters & parameters);
32 
33  virtual Real value(const Point & p);
34  virtual RealGradient gradient(const Point & p);
35 
36  virtual void initialSetup();
37 
38 protected:
39  virtual Real
40  computeSuperellipsoidValue(const Point & p, const Point & center, Real a, Real b, Real c, Real n);
42  const Point & p, const Point & center, Real a, Real b, Real c, Real n);
44  const Point & p, const Point & center, Real a, Real b, Real c, Real n);
45 
46  virtual void computeSuperellipsoidSemiaxes() = 0;
47  virtual void computeSuperellipsoidExponents() = 0;
48  virtual void computeSuperellipsoidCenters() = 0;
49 
50  MooseMesh & _mesh;
51 
52  Real _invalue;
53  Real _outvalue;
55  Real _int_width;
57 
58  unsigned int _num_dim;
59 
60  std::vector<Point> _centers;
61  std::vector<Real> _as;
62  std::vector<Real> _bs;
63  std::vector<Real> _cs;
64  std::vector<Real> _ns;
65 
66  MooseRandom _random;
67 };
68 
virtual RealGradient gradient(const Point &p)
virtual void computeSuperellipsoidSemiaxes()=0
VectorValue< Real > RealGradient
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)