LCOV - code coverage report
Current view: top level - src/kernels - INSMomentumTimeDerivative.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: #32971 (54bef8) with base c6cf66 Lines: 14 15 93.3 %
Date: 2026-05-29 20:37:52 Functions: 5 5 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 "INSMomentumTimeDerivative.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", INSMomentumTimeDerivative);
      13             : 
      14             : InputParameters
      15         471 : INSMomentumTimeDerivative::validParams()
      16             : {
      17         471 :   InputParameters params = TimeDerivative::validParams();
      18         471 :   params.addClassDescription("This class computes the time derivative for the incompressible "
      19             :                              "Navier-Stokes momentum equation.");
      20         942 :   params.addParam<MaterialPropertyName>("rho_name", "rho", "density name");
      21         471 :   return params;
      22           0 : }
      23             : 
      24         254 : INSMomentumTimeDerivative::INSMomentumTimeDerivative(const InputParameters & parameters)
      25         508 :   : TimeDerivative(parameters), _rho(getMaterialProperty<Real>("rho_name"))
      26             : {
      27         254 : }
      28             : 
      29             : Real
      30    45242978 : INSMomentumTimeDerivative::computeQpResidual()
      31             : {
      32    45242978 :   return _rho[_qp] * TimeDerivative::computeQpResidual();
      33             : }
      34             : 
      35             : Real
      36   311040178 : INSMomentumTimeDerivative::computeQpJacobian()
      37             : {
      38   311040178 :   return _rho[_qp] * TimeDerivative::computeQpJacobian();
      39             : }
      40             : 
      41             : Real
      42   506727752 : INSMomentumTimeDerivative::computeQpOffDiagJacobian(unsigned)
      43             : {
      44   506727752 :   return 0.;
      45             : }

Generated by: LCOV version 1.14