https://mooseframework.inl.gov
ConstantAux.C
Go to the documentation of this file.
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 "ConstantAux.h"
11 
12 registerMooseObject("MooseApp", ConstantAux);
13 
16 {
18  params.addClassDescription("Creates a constant field in the domain.");
19  params.addParam<Real>("value", 0.0, "Some constant value that can be read from the input file");
20  params.declareControllable("value");
21  return params;
22 }
23 
25  : AuxKernel(parameters), _value(getParam<Real>("value"))
26 {
27 }
28 
29 Real
31 {
32  return _value;
33 }
Constant auxiliary value.
Definition: ConstantAux.h:17
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const Real & _value
The value being set for the current node/element.
Definition: ConstantAux.h:28
static InputParameters validParams()
Definition: ConstantAux.C:15
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeValue() override
Compute and return the value of the aux variable.
Definition: ConstantAux.C:30
ConstantAux(const InputParameters &parameters)
Definition: ConstantAux.C:24
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 optional parameter and a documentation string to the InputParameters object...
static InputParameters validParams()
Definition: AuxKernel.C:27
registerMooseObject("MooseApp", ConstantAux)
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:36
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
Declare the given parameters as controllable.