LCOV - code coverage report
Current view: top level - src/kokkos/base - KokkosLinearSystemContributionObject.K (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #33416 (b10b36) with base 9fbd27 Lines: 22 23 95.7 %
Date: 2026-07-23 16:15:30 Functions: 3 3 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             : #include "KokkosLinearSystemContributionObject.h"
      11             : 
      12             : #include "FEProblemBase.h"
      13             : #include "InputParameters.h"
      14             : 
      15             : namespace Moose::Kokkos
      16             : {
      17             : 
      18             : InputParameters
      19        7178 : LinearSystemContributionObject::validParams()
      20             : {
      21        7178 :   auto params = ::LinearSystemContributionObject::validParams();
      22        7178 :   params.addPrivateParam<bool>(MooseBase::kokkos_object_param, true);
      23        7178 :   return params;
      24           0 : }
      25             : 
      26        2380 : LinearSystemContributionObject::LinearSystemContributionObject(const InputParameters & parameters)
      27             :   : MooseObject(parameters),
      28             :     SetupInterface(this),
      29             :     FunctionInterface(this),
      30             :     UserObjectInterface(this),
      31             :     TransientInterface(this),
      32             :     PostprocessorInterface(this),
      33             :     VectorPostprocessorInterface(this, false),
      34         404 :     Restartable(this, getBase() + "s"),
      35             :     MeshChangedInterface(parameters),
      36             :     TaggingInterface(this),
      37         808 :     MeshHolder(*getCheckedPointerParam<SubProblem *>("_subproblem")->mesh().getKokkosMesh()),
      38         808 :     SystemHolder(getCheckedPointerParam<SystemBase *>("_sys")->feProblem().getKokkosSystems()),
      39         202 :     _fe_problem(*getParam<FEProblemBase *>("_fe_problem_base")),
      40        1616 :     _t(TransientInterface::_t)
      41             : {
      42        1600 :   const auto * const subproblem = getCheckedPointerParam<SubProblem *>("_subproblem");
      43         598 :   _var.init(subproblem->getVariable(0,
      44         606 :                                     getParam<LinearVariableName>("variable"),
      45             :                                     Moose::VarKindType::VAR_SOLVER,
      46             :                                     Moose::VarFieldType::VAR_FIELD_STANDARD),
      47             :             Moose::SOLUTION_TAG);
      48         400 : }
      49             : 
      50        2027 : LinearSystemContributionObject::LinearSystemContributionObject(
      51        2027 :     const LinearSystemContributionObject & object)
      52             :   : MooseObject(object, {}),
      53             :     SetupInterface(object, {}),
      54             :     FunctionInterface(object, {}),
      55             :     UserObjectInterface(object, {}),
      56             :     TransientInterface(object, {}),
      57             :     PostprocessorInterface(object, {}),
      58             :     VectorPostprocessorInterface(object, {}),
      59             :     Restartable(object, {}),
      60             :     MeshChangedInterface(object, {}),
      61             :     TaggingInterface(object, {}),
      62             :     MeshHolder(object),
      63             :     SystemHolder(object),
      64        1037 :     _fe_problem(object._fe_problem),
      65        1037 :     _var(object._var),
      66        1037 :     _t(object._t)
      67             : {
      68             :   // Tags may be added to the governing tag sets held by the TaggingInterface later than the time
      69             :   // that the primary constructor is run. So it's more robust to build our tag set, immediately
      70             :   // before being dispatched to device, from the governing TaggingInterface set instead of relying
      71             :   // on copying the tag set from object's \p _vector_tags and \p _matrix_tags arrays
      72        2027 :   _vector_tags = object.getVectorTags({});
      73        2027 :   _matrix_tags = object.getMatrixTags({});
      74        2027 : }
      75             : 
      76             : } // namespace Moose::Kokkos

Generated by: LCOV version 1.14