LCOV - code coverage report
Current view: top level - include/kokkos/kernels - KokkosDiffusion.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 863ef6 Lines: 4 4 100.0 %
Date: 2025-10-15 18:16:15 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://www.mooseframework.org
       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 "KokkosKernel.h"
      13             : 
      14             : /**
      15             :  * This kernel implements the Laplacian operator:
      16             :  * $\nabla u \cdot \nabla \phi_i$
      17             :  */
      18             : class KokkosDiffusion : public Moose::Kokkos::Kernel
      19             : {
      20             : public:
      21             :   static InputParameters validParams();
      22             : 
      23             :   KokkosDiffusion(const InputParameters & parameters);
      24             : 
      25             :   KOKKOS_FUNCTION Real computeQpResidual(const unsigned int i,
      26             :                                          const unsigned int qp,
      27             :                                          ResidualDatum & datum) const;
      28             :   KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i,
      29             :                                          const unsigned int j,
      30             :                                          const unsigned int qp,
      31             :                                          ResidualDatum & datum) const;
      32             : };
      33             : 
      34             : KOKKOS_FUNCTION inline Real
      35     6989984 : KokkosDiffusion::computeQpResidual(const unsigned int i,
      36             :                                    const unsigned int qp,
      37             :                                    ResidualDatum & datum) const
      38             : {
      39     6989984 :   return _grad_u(datum, qp) * _grad_test(datum, i, qp);
      40             : }
      41             : 
      42             : KOKKOS_FUNCTION inline Real
      43     3983552 : KokkosDiffusion::computeQpJacobian(const unsigned int i,
      44             :                                    const unsigned int j,
      45             :                                    const unsigned int qp,
      46             :                                    ResidualDatum & datum) const
      47             : {
      48     3983552 :   return _grad_phi(datum, j, qp) * _grad_test(datum, i, qp);
      49             : }

Generated by: LCOV version 1.14