LCOV - code coverage report
Current view: top level - src/controllogic - CopyPostprocessorValueControl.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 "CopyPostprocessorValueControl.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", CopyPostprocessorValueControl);
      13             : 
      14             : InputParameters
      15       19998 : CopyPostprocessorValueControl::validParams()
      16             : {
      17       19998 :   InputParameters params = THMControl::validParams();
      18       39996 :   params.addRequiredParam<PostprocessorName>("postprocessor", "The name of the postprocessor.");
      19       19998 :   params.addClassDescription("Forwards the value of a postprocessor to a ControlData named with "
      20             :                              "the name of the postprocessor.");
      21       19998 :   return params;
      22           0 : }
      23             : 
      24        9997 : CopyPostprocessorValueControl::CopyPostprocessorValueControl(const InputParameters & parameters)
      25             :   : THMControl(parameters),
      26        9997 :     _value(declareControlData<Real>(getParam<PostprocessorName>("postprocessor"))),
      27       19994 :     _pps_value(getPostprocessorValue("postprocessor"))
      28             : {
      29        9997 : }
      30             : 
      31             : void
      32       72908 : CopyPostprocessorValueControl::execute()
      33             : {
      34       72908 :   _value = _pps_value;
      35       72908 : }

Generated by: LCOV version 1.14