LCOV - code coverage report
Current view: top level - include/kokkos/postprocessors - KokkosSideExtremeValue.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 6 6 100.0 %
Date: 2026-05-29 20:35:17 Functions: 2 2 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 "KokkosSideVariablePostprocessor.h"
      13             : #include "KokkosExtremeValueBase.h"
      14             : 
      15             : class KokkosSideExtremeValue : public KokkosExtremeValueBase<KokkosSideVariablePostprocessor>
      16             : {
      17             : public:
      18             :   static InputParameters validParams();
      19             : 
      20             :   KokkosSideExtremeValue(const InputParameters & parameters);
      21             : 
      22             :   KOKKOS_FUNCTION Kokkos::pair<Real, Real> getProxyValuePair(const unsigned int qp,
      23             :                                                              Datum & datum) const;
      24             : 
      25             :   template <typename Derived>
      26             :   KOKKOS_FUNCTION void reduce(Datum & datum, Real * result) const;
      27             : 
      28             : protected:
      29             :   const Moose::Kokkos::VariableValue _proxy_variable;
      30             : };
      31             : 
      32             : KOKKOS_FUNCTION inline Kokkos::pair<Real, Real>
      33        1440 : KokkosSideExtremeValue::getProxyValuePair(const unsigned int qp, Datum & datum) const
      34             : {
      35        2880 :   return Kokkos::make_pair(_proxy_variable(datum, qp), _u(datum, qp));
      36             : }
      37             : 
      38             : template <typename Derived>
      39             : KOKKOS_FUNCTION void
      40         480 : KokkosSideExtremeValue::reduce(Datum & datum, Real * result) const
      41             : {
      42        1920 :   for (unsigned int qp = 0; qp < datum.n_qps(); ++qp)
      43        1440 :     static_cast<const Derived *>(this)->template computeExtremeValue<Derived>(qp, datum, result);
      44         480 : }

Generated by: LCOV version 1.14