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 16633 : ScalarConstantIC::validParams() 16 : { 17 16633 : InputParameters params = ScalarInitialCondition::validParams(); 18 16633 : params.addClassDescription( 19 : "Initalize a scalar variable with a constant value prescribed by an input parameter."); 20 16633 : params.addRequiredParam<Real>("value", "Initial value of the scalar variable"); 21 16633 : return params; 22 0 : } 23 : 24 1184 : ScalarConstantIC::ScalarConstantIC(const InputParameters & parameters) 25 1184 : : ScalarInitialCondition(parameters), _value(getParam<Real>("value")) 26 : { 27 1184 : } 28 : 29 : Real 30 831 : ScalarConstantIC::value() 31 : { 32 831 : return _value; 33 : }