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 
16 {
18  params.addClassDescription("Superellipsoid with a smooth interface");
19  params.addRequiredParam<Real>("x1", "The x coordinate of the superellipsoid center");
20  params.addRequiredParam<Real>("y1", "The y coordinate of the superellipsoid center");
21  params.addParam<Real>("z1", 0.0, "The z coordinate of the superellipsoid center");
22  params.addRequiredParam<Real>("a", "Semiaxis a of the superellipsoid");
23  params.addRequiredParam<Real>("b", "Semiaxis b of the superellipsoid");
24  params.addParam<Real>("c", 1.0, "Semiaxis c of the superellipsoid");
25  params.addRequiredParam<Real>("n", "Exponent n of the superellipsoid");
26  return params;
27 }
28 
30  : SmoothSuperellipsoidBaseIC(parameters),
31  _x1(parameters.get<Real>("x1")),
32  _y1(parameters.get<Real>("y1")),
33  _z1(parameters.get<Real>("z1")),
34  _a(parameters.get<Real>("a")),
35  _b(parameters.get<Real>("b")),
36  _c(parameters.get<Real>("c")),
37  _n(parameters.get<Real>("n")),
38  _center(_x1, _y1, _z1)
39 {
40 }
41 
42 void
44 {
45  _centers = {_center};
46 }
47 
48 void
50 {
51  _as = {_a};
52  _bs = {_b};
53  _cs = {_c};
54 }
55 
56 void
58 {
59  _ns = {_n};
60 }
virtual void computeSuperellipsoidExponents()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
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...
void addRequiredParam(const std::string &name, const std::string &doc_string)
virtual void computeSuperellipsoidSemiaxes()
virtual void computeSuperellipsoidCenters()
registerMooseObject("PhaseFieldApp", SmoothSuperellipsoidIC)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
SmoothSuperellipsoidIC(const InputParameters &parameters)
const Elem & get(const ElemType type_in)
static InputParameters validParams()