LCOV - code coverage report
Current view: top level - src/kokkos/bcs - KokkosDirichletBCBase.K (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #32971 (54bef8) with base c6cf66 Lines: 14 15 93.3 %
Date: 2026-05-29 20:35:17 Functions: 6 6 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 "KokkosDirichletBCBase.h"
      11             : 
      12             : namespace Moose::Kokkos
      13             : {
      14             : 
      15             : template <bool is_ad>
      16             : InputParameters
      17       13052 : DirichletBCBaseTempl<is_ad>::validParams()
      18             : {
      19       13052 :   InputParameters params = Base::validParams();
      20       29264 :   params.addParam<bool>(
      21       19784 :       "preset", true, "Whether or not to preset the BC (apply the value before the solve begins).");
      22       13052 :   return params;
      23           0 : }
      24             : 
      25             : template <bool is_ad>
      26        4955 : DirichletBCBaseTempl<is_ad>::DirichletBCBaseTempl(const InputParameters & parameters)
      27        3598 :   : Base(parameters), _preset(this->template getParam<bool>("preset"))
      28             : {
      29        3377 : }
      30             : 
      31             : template <bool is_ad>
      32             : void
      33        7369 : DirichletBCBaseTempl<is_ad>::presetSolution(TagID tag)
      34             : {
      35        7369 :   _solution_tag = tag;
      36             : 
      37        7369 :   Policy policy(0, numKokkosBoundaryNodes());
      38             : 
      39        7369 :   auto dispatcher = DispatcherRegistry::build<PresetLoop>(this, this->type());
      40             : 
      41        7369 :   dispatcher->parallelFor(policy);
      42        7369 : }
      43             : 
      44             : template class DirichletBCBaseTempl<false>;
      45             : template class DirichletBCBaseTempl<true>;
      46             : 
      47             : } // namespace Moose::Kokkos

Generated by: LCOV version 1.14