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 "ConstantIC.h" 11 : #include "libmesh/point.h" 12 : 13 : registerMooseObject("MooseApp", ConstantIC); 14 : 15 : InputParameters 16 43027 : ConstantIC::validParams() 17 : { 18 43027 : InputParameters params = InitialCondition::validParams(); 19 43027 : params.addRequiredParam<Real>("value", "The value to be set in IC"); 20 43027 : params.addClassDescription("Sets a constant field value."); 21 43027 : return params; 22 0 : } 23 : 24 15067 : ConstantIC::ConstantIC(const InputParameters & parameters) 25 15067 : : InitialCondition(parameters), _value(getParam<Real>("value")) 26 : { 27 15067 : } 28 : 29 : Real 30 4513271 : ConstantIC::value(const Point & /*p*/) 31 : { 32 4513271 : return _value; 33 : }