LCOV - code coverage report
Current view: top level - src/chaincontrols - SetValueChainControl.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 14 14 100.0 %
Date: 2025-07-17 01:28:37 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       28578 : SetValueChainControlTempl<T>::validParams()
      19             : {
      20       28578 :   InputParameters params = ChainControl::validParams();
      21       28578 :   params.addRequiredParam<std::string>("parameter", "Parameter(s) to control");
      22       28578 :   params.addRequiredParam<std::string>("value",
      23             :                                        "Control data to use for the value of the parameter(s)");
      24       28578 :   const std::string type_str = MooseUtils::prettyCppType<T>();
      25       28578 :   params.addClassDescription("Sets parameter(s) of type '" + type_str +
      26             :                              "' to a control data value of type '" + type_str + "'.");
      27       57156 :   return params;
      28       28578 : }
      29             : 
      30             : template <typename T>
      31          24 : SetValueChainControlTempl<T>::SetValueChainControlTempl(const InputParameters & parameters)
      32          24 :   : ChainControl(parameters), _value(getChainControlData<T>("value"))
      33             : {
      34          24 : }
      35             : 
      36             : template <typename T>
      37             : void
      38          90 : SetValueChainControlTempl<T>::execute()
      39             : {
      40          90 :   setControllableValue<T>("parameter", _value);
      41          90 : }

Generated by: LCOV version 1.14