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