LCOV - code coverage report
Current view: top level - src/scalarkernels - ADShaftComponentTorqueScalarKernel.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 12 13 92.3 %
Date: 2025-07-30 13:02:48 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://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 "ADShaftComponentTorqueScalarKernel.h"
      11             : #include "UserObject.h"
      12             : #include "ADShaftConnectableUserObjectInterface.h"
      13             : 
      14             : registerMooseObject("ThermalHydraulicsApp", ADShaftComponentTorqueScalarKernel);
      15             : 
      16             : InputParameters
      17         900 : ADShaftComponentTorqueScalarKernel::validParams()
      18             : {
      19         900 :   InputParameters params = ADScalarKernel::validParams();
      20        1800 :   params.addRequiredParam<UserObjectName>("shaft_connected_component_uo",
      21             :                                           "Shaft connected component user object name");
      22         900 :   params.addClassDescription("Torque contributed by a component connected to a shaft");
      23         900 :   return params;
      24           0 : }
      25             : 
      26         450 : ADShaftComponentTorqueScalarKernel::ADShaftComponentTorqueScalarKernel(
      27         450 :     const InputParameters & parameters)
      28             :   : ADScalarKernel(parameters),
      29         450 :     _shaft_connected_component_uo(
      30         450 :         getUserObject<ADShaftConnectableUserObjectInterface>("shaft_connected_component_uo"))
      31             : {
      32         450 : }
      33             : 
      34             : ADReal
      35       25944 : ADShaftComponentTorqueScalarKernel::computeQpResidual()
      36             : {
      37       25944 :   return -_shaft_connected_component_uo.getTorque();
      38             : }

Generated by: LCOV version 1.14