LCOV - code coverage report
Current view: top level - src/controllogic - GetFunctionValueControl.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 12 13 92.3 %
Date: 2025-07-30 13:02:48 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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 "GetFunctionValueControl.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("ThermalHydraulicsApp", GetFunctionValueControl);
      14             : 
      15             : InputParameters
      16         346 : GetFunctionValueControl::validParams()
      17             : {
      18         346 :   InputParameters params = THMControl::validParams();
      19         346 :   params.addClassDescription("Sets a ControlData named 'value' with the value of a function");
      20         692 :   params.addRequiredParam<FunctionName>("function",
      21             :                                         "The name of the function prescribing a value.");
      22         346 :   return params;
      23           0 : }
      24             : 
      25         172 : GetFunctionValueControl::GetFunctionValueControl(const InputParameters & parameters)
      26             :   : THMControl(parameters),
      27         172 :     _value(declareComponentControlData<Real>("value")),
      28         344 :     _function(getFunction("function"))
      29             : {
      30         172 : }
      31             : 
      32             : void
      33        1788 : GetFunctionValueControl::execute()
      34             : {
      35        1788 :   _value = _function.value(_t, Point());
      36        1788 : }

Generated by: LCOV version 1.14