LCOV - code coverage report
Current view: top level - include/kokkos/auxkernels - KokkosMaterialRealAux.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 2 2 100.0 %
Date: 2026-05-29 20:35:17 Functions: 1 1 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             : #pragma once
      11             : 
      12             : #include "KokkosAuxKernel.h"
      13             : 
      14             : class KokkosMaterialRealAux : public Moose::Kokkos::AuxKernel
      15             : {
      16             : public:
      17             :   static InputParameters validParams();
      18             : 
      19             :   /**
      20             :    * Class constructor
      21             :    * @param parameters The input parameters for this object
      22             :    */
      23             :   KokkosMaterialRealAux(const InputParameters & parameters);
      24             : 
      25             :   template <typename Derived>
      26             :   KOKKOS_FUNCTION Real computeValue(const unsigned int qp, AssemblyDatum & datum) const;
      27             : 
      28             : private:
      29             :   /// Material property for this AuxKernel
      30             :   const Moose::Kokkos::MaterialProperty<Real> _prop;
      31             : 
      32             :   /// Multiplier for the material property
      33             :   const Real _factor;
      34             : 
      35             :   /// Value to be added to the material property
      36             :   const Real _offset;
      37             : };
      38             : 
      39             : template <typename Derived>
      40             : KOKKOS_FUNCTION Real
      41     1808388 : KokkosMaterialRealAux::computeValue(const unsigned int qp, AssemblyDatum & datum) const
      42             : {
      43     1808388 :   return _prop(datum, qp) * _factor + _offset;
      44             : }

Generated by: LCOV version 1.14