https://mooseframework.inl.gov
GetFunctionValueControl.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 
11 #include "Function.h"
12 
13 registerMooseObject("ThermalHydraulicsApp", GetFunctionValueControl);
14 
17 {
19  params.addClassDescription("Sets a ControlData named 'value' with the value of a function");
20  params.addRequiredParam<FunctionName>("function",
21  "The name of the function prescribing a value.");
22  return params;
23 }
24 
26  : THMControl(parameters),
27  _value(declareComponentControlData<Real>("value")),
28  _function(getFunction("function"))
29 {
30 }
31 
32 void
34 {
35  _value = _function.value(_t, Point());
36 }
GetFunctionValueControl(const InputParameters &parameters)
This control takes a function and converts it into a control data.
registerMooseObject("ThermalHydraulicsApp", GetFunctionValueControl)
Real & _value
The stored function value.
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
Definition: THMControl.C:13
Real & _t
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
virtual Real value(Real t, const Point &p) const
const Function & _function
Function that is sampled.