LCOV - code coverage report
Current view: top level - src/controls - ConditionalFunctionEnableControl.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 11 12 91.7 %
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 "ConditionalFunctionEnableControl.h"
      11             : #include "Function.h"
      12             : 
      13             : registerMooseObject("MooseApp", ConditionalFunctionEnableControl);
      14             : 
      15             : InputParameters
      16       14313 : ConditionalFunctionEnableControl::validParams()
      17             : {
      18       14313 :   InputParameters params = ConditionalEnableControl::validParams();
      19             : 
      20       14313 :   params.addRequiredParam<FunctionName>("conditional_function",
      21             :                                         "The function to give a true or false value");
      22             : 
      23       14313 :   params.addClassDescription(
      24             :       "Control for enabling/disabling objects when a function value is true");
      25             : 
      26       14313 :   return params;
      27           0 : }
      28             : 
      29          24 : ConditionalFunctionEnableControl::ConditionalFunctionEnableControl(
      30          24 :     const InputParameters & parameters)
      31          24 :   : ConditionalEnableControl(parameters), _function(getFunction("conditional_function"))
      32             : {
      33          24 : }
      34             : 
      35             : bool
      36         432 : ConditionalFunctionEnableControl::conditionMet(const unsigned int & /*i*/)
      37             : {
      38         432 :   return _function.value(_t);
      39             : }

Generated by: LCOV version 1.14