LCOV - code coverage report
Current view: top level - src/kokkos/userobjects - KokkosSideUserObject.K (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 20 23 87.0 %
Date: 2026-05-29 20:35:17 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       13026 : SideUserObject::validParams()
      17             : {
      18       13026 :   InputParameters params = UserObject::validParams();
      19       13026 :   params += SideReducer::validParams();
      20       13026 :   params += ::MaterialPropertyInterface::validParams();
      21       13026 :   params += ::TransientInterface::validParams();
      22       13026 :   params += ::ElementIDInterface::validParams();
      23       13026 :   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         221 : }
      35             : 
      36         756 : SideUserObject::SideUserObject(const SideUserObject & object)
      37             :   : UserObject(object),
      38             :     SideReducer(object),
      39             :     ::MaterialPropertyInterface(object, {}),
      40             :     ::CoupleableMooseVariableDependencyIntermediateInterface(object, {}),
      41             :     ::TransientInterface(object, {}),
      42         406 :     ::ElementIDInterface(object, {})
      43             : {
      44         756 : }
      45             : 
      46             : void
      47         197 : SideUserObject::compute()
      48             : {
      49         197 :   if (DispatcherRegistry::hasUserMethod<DefaultLoop>(type()) ==
      50         106 :       DispatcherRegistry::hasUserMethod<ReducerLoop>(type()))
      51           0 :     mooseError("Cannot determine whether '",
      52           0 :                name(),
      53             :                "' is a regular user object or a reducer object. Either none or both of the "
      54             :                "execute() and reduce() methods were specified. Check if they were defined properly "
      55             :                "and override compute() if you want to manually choose the behavior.");
      56             : 
      57         197 :   if (DispatcherRegistry::hasUserMethod<ReducerLoop>(type()))
      58         182 :     computeReducer();
      59             :   else
      60          15 :     computeUserObject();
      61         197 : }
      62             : 
      63             : } // namespace Moose::Kokkos

Generated by: LCOV version 1.14