LCOV - code coverage report
Current view: top level - src/chaincontrols - SetValueChainControl.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #31730 (e8b711) with base e0c998 Lines: 14 14 100.0 %
Date: 2025-10-29 16:49:47 Functions: 6 6 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 "SetValueChainControl.h"
      11             : #include "MooseUtils.h"
      12             : 
      13             : registerMooseObject("MooseApp", SetRealValueChainControl);
      14             : registerMooseObject("MooseApp", SetBoolValueChainControl);
      15             : 
      16             : template <typename T>
      17             : InputParameters
      18       29838 : SetValueChainControlTempl<T>::validParams()
      19             : {
      20       29838 :   InputParameters params = ChainControl::validParams();
      21      119352 :   params.addRequiredParam<std::string>("parameter", "Parameter(s) to control");
      22       89514 :   params.addRequiredParam<std::string>("value",
      23             :                                        "Control data to use for the value of the parameter(s)");
      24       29838 :   const std::string type_str = MooseUtils::prettyCppType<T>();
      25       29838 :   params.addClassDescription("Sets parameter(s) of type '" + type_str +
      26             :                              "' to a control data value of type '" + type_str + "'.");
      27       59676 :   return params;
      28       29838 : }
      29             : 
      30             : template <typename T>
      31          52 : SetValueChainControlTempl<T>::SetValueChainControlTempl(const InputParameters & parameters)
      32         104 :   : ChainControl(parameters), _value(getChainControlData<T>("value"))
      33             : {
      34          52 : }
      35             : 
      36             : template <typename T>
      37             : void
      38         196 : SetValueChainControlTempl<T>::execute()
      39             : {
      40         392 :   setControllableValue<T>("parameter", _value);
      41         196 : }

Generated by: LCOV version 1.14