www.mooseframework.org
ConstantIC.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "ConstantIC.h"
16 #include "libmesh/point.h"
17 
18 template <>
21 {
23  params.addRequiredParam<Real>("value", "The value to be set in IC");
24  return params;
25 }
26 
28  : InitialCondition(parameters), _value(getParam<Real>("value"))
29 {
30 }
31 
32 Real
33 ConstantIC::value(const Point & /*p*/)
34 {
35  return _value;
36 }
Real _value
Definition: ConstantIC.h:54
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
ConstantIC(const InputParameters &parameters)
Constructor.
Definition: ConstantIC.C:27
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
InitialConditions are objects that set the initial value of variables.
virtual Real value(const Point &p) override
The value of the variable at a point.
Definition: ConstantIC.C:33
InputParameters validParams< ConstantIC >()
Definition: ConstantIC.C:20
InputParameters validParams< InitialCondition >()