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  params.addParam<Point>("point", Point(), "Point at which to evaluate function");
23  return params;
24 }
25 
27  : THMControl(parameters),
28  _value(declareComponentControlData<Real>("value")),
29  _point(getParam<Point>("point")),
30  _function(getFunction("function"))
31 {
32 }
33 
34 void
36 {
38 }
GetFunctionValueControl(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
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.
const Point & _point
Point at which to evaluate function.