Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 "SmoothCircleIC.h" 11 : 12 : registerMooseObject("PhaseFieldApp", SmoothCircleIC); 13 : 14 : InputParameters 15 2633 : SmoothCircleIC::validParams() 16 : { 17 2633 : InputParameters params = SmoothCircleBaseIC::validParams(); 18 2633 : params.addClassDescription("Circle with a smooth interface"); 19 5266 : params.addRequiredParam<Real>("x1", "The x coordinate of the circle center"); 20 5266 : params.addRequiredParam<Real>("y1", "The y coordinate of the circle center"); 21 5266 : params.addParam<Real>("z1", 0.0, "The z coordinate of the circle center"); 22 5266 : params.addRequiredParam<Real>("radius", "The radius of a circle"); 23 2633 : return params; 24 0 : } 25 : 26 1408 : SmoothCircleIC::SmoothCircleIC(const InputParameters & parameters) 27 : : SmoothCircleBaseIC(parameters), 28 1408 : _x1(parameters.get<Real>("x1")), 29 1408 : _y1(parameters.get<Real>("y1")), 30 1408 : _z1(parameters.get<Real>("z1")), 31 1408 : _radius(parameters.get<Real>("radius")), 32 2816 : _center(_x1, _y1, _z1) 33 : { 34 1408 : } 35 : 36 : void 37 1184 : SmoothCircleIC::computeCircleRadii() 38 : { 39 1184 : _radii = {_radius}; 40 1184 : } 41 : 42 : void 43 1184 : SmoothCircleIC::computeCircleCenters() 44 : { 45 1184 : _centers = {_center}; 46 1184 : }