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 "ScalarConstantIC.h" 11 : 12 : registerMooseObject("MooseApp", ScalarConstantIC); 13 : 14 : InputParameters 15 16825 : ScalarConstantIC::validParams() 16 : { 17 16825 : InputParameters params = ScalarInitialCondition::validParams(); 18 33650 : params.addClassDescription( 19 : "Initalize a scalar variable with a constant value prescribed by an input parameter."); 20 50475 : params.addRequiredParam<Real>("value", "Initial value of the scalar variable"); 21 16825 : return params; 22 0 : } 23 : 24 1280 : ScalarConstantIC::ScalarConstantIC(const InputParameters & parameters) 25 2560 : : ScalarInitialCondition(parameters), _value(getParam<Real>("value")) 26 : { 27 1280 : } 28 : 29 : Real 30 921 : ScalarConstantIC::value() 31 : { 32 921 : return _value; 33 : }