LCOV - code coverage report
Current view: top level - src/functions - FunctionInterface.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #33187 (5aa0b2) with base d7c4bd Lines: 12 16 75.0 %
Date: 2026-06-30 12:18:20 Functions: 4 6 66.7 %
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 "FunctionInterface.h"
      11             : #include "Function.h"
      12             : #include "SubProblem.h"
      13             : #include "MooseTypes.h"
      14             : #include "FEProblemBase.h"
      15             : 
      16             : InputParameters
      17      313652 : FunctionInterface::validParams()
      18             : {
      19      313652 :   return emptyInputParameters();
      20             : }
      21             : 
      22      722809 : FunctionInterface::FunctionInterface(const MooseObject * moose_object)
      23             :   :
      24             : #ifdef MOOSE_KOKKOS_ENABLED
      25      551921 :     _fni_object(*moose_object),
      26             : #endif
      27      722809 :     _fni_params(moose_object->parameters()),
      28     2891236 :     _fni_feproblem(*_fni_params.getCheckedPointerParam<FEProblemBase *>("_fe_problem_base")),
      29      722809 :     _fni_tid(_fni_params.have_parameter<THREAD_ID>("_tid") ? _fni_params.get<THREAD_ID>("_tid") : 0)
      30             : {
      31      722809 : }
      32             : 
      33             : const Function &
      34       53463 : FunctionInterface::getFunction(const std::string & name) const
      35             : {
      36       53463 :   return getFunctionByName(_fni_params.get<FunctionName>(name));
      37             : }
      38             : 
      39             : const Function &
      40       60011 : FunctionInterface::getFunctionByName(const FunctionName & name) const
      41             : {
      42       60011 :   return _fni_feproblem.getFunction(name, _fni_tid);
      43             : }
      44             : 
      45             : bool
      46           0 : FunctionInterface::hasFunction(const std::string & param_name) const
      47             : {
      48           0 :   return hasFunctionByName(_fni_params.get<FunctionName>(param_name));
      49             : }
      50             : 
      51             : bool
      52           0 : FunctionInterface::hasFunctionByName(const FunctionName & name) const
      53             : {
      54           0 :   return _fni_feproblem.hasFunction(name, _fni_tid);
      55             : }

Generated by: LCOV version 1.14