LCOV - code coverage report
Current view: top level - src/chaincontrols - GetFunctionValueChainControl.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 14 15 93.3 %
Date: 2026-05-29 20:35:17 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 "GetFunctionValueChainControl.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("MooseApp", GetFunctionValueChainControl);
      14             : 
      15             : InputParameters
      16        3403 : GetFunctionValueChainControl::validParams()
      17             : {
      18        3403 :   InputParameters params = ChainControl::validParams();
      19        6806 :   params.addClassDescription("Creates a control data and populates it by evaluating a Function.");
      20       13612 :   params.addRequiredParam<FunctionName>("function", "Function to be evaluated");
      21       10209 :   params.addParam<Point>("point", Point(), "Spatial point at which to evaluate the function");
      22        3403 :   return params;
      23           0 : }
      24             : 
      25         171 : GetFunctionValueChainControl::GetFunctionValueChainControl(const InputParameters & parameters)
      26             :   : ChainControl(parameters),
      27         171 :     _value(declareChainControlData<Real>("value")),
      28         342 :     _function(getFunction("function")),
      29         513 :     _point(getParam<Point>("point"))
      30             : {
      31         171 : }
      32             : 
      33             : void
      34         684 : GetFunctionValueChainControl::execute()
      35             : {
      36         684 :   _value = _function.value(_t, _point);
      37         684 : }

Generated by: LCOV version 1.14