LCOV - code coverage report
Current view: top level - include/kokkos/functions - KokkosConstantFunction.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #31782 (615931) with base 7edd10 Lines: 1 3 33.3 %
Date: 2025-11-11 23:21:15 Functions: 1 2 50.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             : #pragma once
      11             : 
      12             : #include "KokkosFunction.h"
      13             : 
      14             : /**
      15             :  * Class that represents constant function
      16             :  */
      17             : class KokkosConstantFunction : public Moose::Kokkos::FunctionBase
      18             : {
      19             : public:
      20             :   static InputParameters validParams();
      21             : 
      22             :   KokkosConstantFunction(const InputParameters & parameters);
      23             : 
      24             :   using Real3 = Moose::Kokkos::Real3;
      25             : 
      26     6094400 :   KOKKOS_FUNCTION Real value(Real /* t */, Real3 /* p */) const { return _value; }
      27           0 :   KOKKOS_FUNCTION Real timeIntegral(Real t1, Real t2, Real3 /* p */) const
      28             :   {
      29           0 :     return _value * (t2 - t1);
      30             :   }
      31             : 
      32             : protected:
      33             :   Moose::Kokkos::Scalar<const Real> _value;
      34             : };

Generated by: LCOV version 1.14