LCOV - code coverage report
Current view: top level - src/kokkos/userobjects - KokkosSideUserObject.K (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #33416 (b10b36) with base 9fbd27 Lines: 20 23 87.0 %
Date: 2026-07-23 16:15:30 Functions: 4 4 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             : #include "KokkosSideUserObject.h"
      11             : 
      12             : namespace Moose::Kokkos
      13             : {
      14             : 
      15             : InputParameters
      16       13194 : SideUserObject::validParams()
      17             : {
      18       13194 :   InputParameters params = UserObject::validParams();
      19       13194 :   params += SideReducer::validParams();
      20       13194 :   params += ::MaterialPropertyInterface::validParams();
      21       13194 :   params += ::TransientInterface::validParams();
      22       13194 :   params += ::ElementIDInterface::validParams();
      23       13194 :   return params;
      24           0 : }
      25             : 
      26         221 : SideUserObject::SideUserObject(const InputParameters & parameters)
      27             :   : UserObject(parameters),
      28             :     SideReducer(this),
      29             :     ::MaterialPropertyInterface(this, Moose::EMPTY_BLOCK_IDS, boundaryIDs()),
      30             :     ::CoupleableMooseVariableDependencyIntermediateInterface(this, false),
      31             :     ::TransientInterface(this),
      32         117 :     ::ElementIDInterface(this)
      33             : {
      34             :   // Kokkos user objects currently only consume variable information through finite element bases
      35             :   // and quadrature points
      36         221 : }
      37             : 
      38         756 : SideUserObject::SideUserObject(const SideUserObject & object)
      39             :   : UserObject(object),
      40             :     SideReducer(object),
      41             :     ::MaterialPropertyInterface(object, {}),
      42             :     ::CoupleableMooseVariableDependencyIntermediateInterface(object, {}),
      43             :     ::TransientInterface(object, {}),
      44         406 :     ::ElementIDInterface(object, {})
      45             : {
      46         756 : }
      47             : 
      48             : void
      49         197 : SideUserObject::compute()
      50             : {
      51         197 :   if (DispatcherRegistry::hasUserMethod<DefaultLoop>(type()) ==
      52         106 :       DispatcherRegistry::hasUserMethod<ReducerLoop>(type()))
      53           0 :     mooseError("Cannot determine whether '",
      54           0 :                name(),
      55             :                "' is a regular user object or a reducer object. Either none or both of the "
      56             :                "execute() and reduce() methods were specified. Check if they were defined properly "
      57             :                "and override compute() if you want to manually choose the behavior.");
      58             : 
      59         197 :   if (DispatcherRegistry::hasUserMethod<ReducerLoop>(type()))
      60         182 :     computeReducer();
      61             :   else
      62          15 :     computeUserObject();
      63         197 : }
      64             : 
      65             : } // namespace Moose::Kokkos

Generated by: LCOV version 1.14