LCOV - code coverage report
Current view: top level - src/kokkos/kernels - KokkosCoupledForce.K (source / functions) Hit Total Coverage
Test: idaholab/moose framework: #31706 (f8ed4a) with base bb0a08 Lines: 14 16 87.5 %
Date: 2025-11-03 17:23:24 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 "KokkosCoupledForce.h"
      11             : 
      12      412841 : registerKokkosResidualObject("MooseApp", KokkosCoupledForce);
      13             : 
      14             : InputParameters
      15        9298 : KokkosCoupledForce::validParams()
      16             : {
      17        9298 :   InputParameters params = Kernel::validParams();
      18             : 
      19       18596 :   params.addClassDescription("Implements a source term proportional to the value of a coupled "
      20             :                              "variable. Weak form: $(\\psi_i, -\\sigma v)$.");
      21       37192 :   params.addRequiredCoupledVar("v", "The coupled variable which provides the force");
      22       18612 :   params.addParam<Real>(
      23       18564 :       "coef", 1.0, "Coefficent ($\\sigma$) multiplier for the coupled force term.");
      24             : 
      25        9298 :   return params;
      26           0 : }
      27             : 
      28          68 : KokkosCoupledForce::KokkosCoupledForce(const InputParameters & parameters)
      29             :   : Kernel(parameters),
      30          26 :     _v_var(coupled("v")),
      31          52 :     _v(kokkosCoupledValue("v")),
      32          78 :     _coef(getParam<Real>("coef"))
      33             : {
      34          33 :   if (_var.number() == _v_var)
      35           0 :     paramError(
      36             :         "v", "Coupled variable 'v' needs to be different from 'variable' with KokkosCoupledForce.");
      37          33 : }

Generated by: LCOV version 1.14