LCOV - code coverage report
Current view: top level - src/kernels - VectorCoupledTimeDerivative.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 17 19 89.5 %
Date: 2025-07-17 01:28:37 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 "VectorCoupledTimeDerivative.h"
      11             : 
      12             : registerMooseObject("MooseApp", VectorCoupledTimeDerivative);
      13             : 
      14             : InputParameters
      15       14336 : VectorCoupledTimeDerivative::validParams()
      16             : {
      17       14336 :   InputParameters params = VectorKernel::validParams();
      18       14336 :   params.addClassDescription(
      19             :       "Time derivative Kernel that acts on a coupled vector variable. Weak form: "
      20             :       "$(\\vec{\\psi}_i, \\frac{\\partial \\vec{v_h}}{\\partial t})$.");
      21       14336 :   params.addRequiredCoupledVar("v", "Coupled vector variable");
      22       14336 :   return params;
      23           0 : }
      24             : 
      25          37 : VectorCoupledTimeDerivative::VectorCoupledTimeDerivative(const InputParameters & parameters)
      26             :   : VectorKernel(parameters),
      27          37 :     _v_dot(coupledVectorDot("v")),
      28          37 :     _dv_dot(coupledVectorDotDu("v")),
      29          74 :     _v_var(coupled("v"))
      30             : {
      31          37 : }
      32             : 
      33             : Real
      34     1690400 : VectorCoupledTimeDerivative::computeQpResidual()
      35             : {
      36     1690400 :   return _test[_i][_qp] * _v_dot[_qp];
      37             : }
      38             : 
      39             : Real
      40      294400 : VectorCoupledTimeDerivative::computeQpJacobian()
      41             : {
      42      294400 :   return 0.0;
      43             : }
      44             : 
      45             : Real
      46      294400 : VectorCoupledTimeDerivative::computeQpOffDiagJacobian(unsigned int jvar)
      47             : {
      48      294400 :   if (jvar == _v_var)
      49      294400 :     return _test[_i][_qp] * _phi[_j][_qp] * _dv_dot[_qp];
      50             : 
      51           0 :   return 0.0;
      52             : }

Generated by: LCOV version 1.14