https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
34void
registerMooseObject("ThermalHydraulicsApp", GetFunctionValueControl)
virtual Real value(Real t, const Point &p) const
This control takes a function and converts it into a control data.
Real & _value
The stored function value.
const Function & _function
Function that is sampled.
GetFunctionValueControl(const InputParameters &parameters)
static InputParameters validParams()
const Point & _point
Point at which to evaluate function.
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Definition THMControl.C:13
Real & _t