LCOV - code coverage report
Current view: top level - src/scalarkernels - CoupledODETimeDerivative.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 13 15 86.7 %
Date: 2025-07-17 01:28:37 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 "CoupledODETimeDerivative.h"
      11             : 
      12             : registerMooseObject("MooseApp", CoupledODETimeDerivative);
      13             : 
      14             : InputParameters
      15       14393 : CoupledODETimeDerivative::validParams()
      16             : {
      17       14393 :   InputParameters params = ODETimeKernel::validParams();
      18       14393 :   params.addClassDescription(
      19             :       "Residual contribution of ODE from the time derivative of a coupled variable.");
      20       14393 :   params.addRequiredCoupledVar("v", "Coupled variable.");
      21       14393 :   return params;
      22           0 : }
      23             : 
      24          64 : CoupledODETimeDerivative::CoupledODETimeDerivative(const InputParameters & parameters)
      25          64 :   : ODETimeKernel(parameters), _v_dot(coupledScalarDot("v")), _dv_dot_dv(coupledScalarDotDu("v"))
      26             : {
      27          64 : }
      28             : 
      29             : Real
      30         465 : CoupledODETimeDerivative::computeQpResidual()
      31             : {
      32         465 :   return _v_dot[_i];
      33             : }
      34             : 
      35             : Real
      36          93 : CoupledODETimeDerivative::computeQpJacobian()
      37             : {
      38          93 :   if (_i == _j)
      39          93 :     return _dv_dot_dv[_i];
      40             :   else
      41           0 :     return 0;
      42             : }

Generated by: LCOV version 1.14