LCOV - code coverage report
Current view: top level - src/chaincontrols - GetFunctionValueChainControl.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 14 15 93.3 %
Date: 2025-07-17 01:28:37 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       14549 : GetFunctionValueChainControl::validParams()
      17             : {
      18       14549 :   InputParameters params = ChainControl::validParams();
      19       14549 :   params.addClassDescription("Creates a control data and populates it by evaluating a Function.");
      20       14549 :   params.addRequiredParam<FunctionName>("function", "Function to be evaluated");
      21       14549 :   params.addParam<Point>("point", Point(), "Spatial point at which to evaluate the function");
      22       14549 :   return params;
      23           0 : }
      24             : 
      25         142 : GetFunctionValueChainControl::GetFunctionValueChainControl(const InputParameters & parameters)
      26             :   : ChainControl(parameters),
      27         142 :     _value(declareChainControlData<Real>("value")),
      28         142 :     _function(getFunction("function")),
      29         284 :     _point(getParam<Point>("point"))
      30             : {
      31         142 : }
      32             : 
      33             : void
      34         558 : GetFunctionValueChainControl::execute()
      35             : {
      36         558 :   _value = _function.value(_t, _point);
      37         558 : }

Generated by: LCOV version 1.14