www.mooseframework.org
ConstantAux.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 "ConstantAux.h"
16 
17 template <>
20 {
22  params.addClassDescription("Creates a constant field in the domain.");
23  params.addParam<Real>("value", 0.0, "Some constant value that can be read from the input file");
24  params.declareControllable("value");
25  return params;
26 }
27 
29  : AuxKernel(parameters), _value(getParam<Real>("value"))
30 {
31 }
32 
33 Real
35 {
36  return _value;
37 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< AuxKernel >()
Definition: AuxKernel.C:30
const Real & _value
The value being set for the current node/element.
Definition: ConstantAux.h:38
void declareControllable(const std::string &name)
Declare the given parameters as controllable.
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:51
virtual Real computeValue() override
Definition: ConstantAux.C:34
ConstantAux(const InputParameters &parameters)
Definition: ConstantAux.C:28
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object...
InputParameters validParams< ConstantAux >()
Definition: ConstantAux.C:19