www.mooseframework.org
SmoothSuperellipsoidIC.C
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 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<SmoothSuperellipsoidBaseIC>();
14  params.addClassDescription("Superellipsoid with a smooth interface");
15  params.addRequiredParam<Real>("x1", "The x coordinate of the superellipsoid center");
16  params.addRequiredParam<Real>("y1", "The y coordinate of the superellipsoid center");
17  params.addParam<Real>("z1", 0.0, "The z coordinate of the superellipsoid center");
18  params.addRequiredParam<Real>("a", "Semiaxis a of the superellipsoid");
19  params.addRequiredParam<Real>("b", "Semiaxis b of the superellipsoid");
20  params.addParam<Real>("c", 1.0, "Semiaxis c of the superellipsoid");
21  params.addRequiredParam<Real>("n", "Exponent n of the superellipsoid");
22  return params;
23 }
24 
25 SmoothSuperellipsoidIC::SmoothSuperellipsoidIC(const InputParameters & parameters)
26  : SmoothSuperellipsoidBaseIC(parameters),
27  _x1(parameters.get<Real>("x1")),
28  _y1(parameters.get<Real>("y1")),
29  _z1(parameters.get<Real>("z1")),
30  _a(parameters.get<Real>("a")),
31  _b(parameters.get<Real>("b")),
32  _c(parameters.get<Real>("c")),
33  _n(parameters.get<Real>("n")),
34  _center(_x1, _y1, _z1)
35 {
36 }
37 
38 void
40 {
41  _centers = {_center};
42 }
43 
44 void
46 {
47  _as = {_a};
48  _bs = {_b};
49  _cs = {_c};
50 }
51 
52 void
54 {
55  _ns = {_n};
56 }
virtual void computeSuperellipsoidExponents()
InputParameters validParams< SmoothSuperellipsoidIC >()
SmoothSuperellipsoidBaseIC is the base class for all initial conditions that create superellipsoids...
InputParameters validParams< SmoothSuperellipsoidBaseIC >()
virtual void computeSuperellipsoidSemiaxes()
virtual void computeSuperellipsoidCenters()
SmoothSuperellipsoidIC(const InputParameters &parameters)