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 3891 : SmoothCircleIC::validParams() 16 : { 17 3891 : InputParameters params = SmoothCircleBaseIC::validParams(); 18 3891 : params.addClassDescription("Circle with a smooth interface"); 19 7782 : params.addRequiredParam<Real>("x1", "The x coordinate of the circle center"); 20 7782 : params.addRequiredParam<Real>("y1", "The y coordinate of the circle center"); 21 7782 : params.addParam<Real>("z1", 0.0, "The z coordinate of the circle center"); 22 7782 : params.addRequiredParam<Real>("radius", "The radius of a circle"); 23 3891 : return params; 24 0 : } 25 : 26 2037 : SmoothCircleIC::SmoothCircleIC(const InputParameters & parameters) 27 : : SmoothCircleBaseIC(parameters), 28 2037 : _x1(parameters.get<Real>("x1")), 29 2037 : _y1(parameters.get<Real>("y1")), 30 2037 : _z1(parameters.get<Real>("z1")), 31 2037 : _radius(parameters.get<Real>("radius")), 32 4074 : _center(_x1, _y1, _z1) 33 : { 34 2037 : } 35 : 36 : void 37 1493 : SmoothCircleIC::computeCircleRadii() 38 : { 39 1493 : _radii = {_radius}; 40 1493 : } 41 : 42 : void 43 1493 : SmoothCircleIC::computeCircleCenters() 44 : { 45 1493 : _centers = {_center}; 46 1493 : }