LCOV - code coverage report
Current view: top level - include/dgkernels - DGLowerDKernel.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 3 7 42.9 %
Date: 2025-07-17 01:28:37 Functions: 3 5 60.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             : #pragma once
      11             : 
      12             : #include "DGKernel.h"
      13             : /**
      14             :  * The DGKernel class is responsible for calculating the residuals for various
      15             :  * physics on internal sides (edges/faces) along with its associated lower-d elements.
      16             :  */
      17             : class DGLowerDKernel : public DGKernel
      18             : {
      19             : public:
      20             :   /**
      21             :    * Factory constructor initializes all internal references needed for residual computation.
      22             :    *
      23             :    *
      24             :    * @param parameters The parameters object for holding additional parameters for kernels and
      25             :    * derived kernels
      26             :    */
      27             :   static InputParameters validParams();
      28             : 
      29             :   DGLowerDKernel(const InputParameters & parameters);
      30             : 
      31             :   /**
      32             :    * The variable that this kernel operates on.
      33             :    */
      34       17460 :   const MooseVariableFEBase & variable() const override final { return _var; }
      35             : 
      36             :   /**
      37             :    * The variable that this kernel operates on.
      38             :    */
      39             :   const MooseVariableFEBase & lowerDVariable() const { return _lowerd_var; }
      40             : 
      41             :   /**
      42             :    * Computes the residual for this element, the neighbor and the lower-d element
      43             :    */
      44             :   virtual void computeResidual() override;
      45             : 
      46             :   /**
      47             :    * Computes the nine pieces of element/neighbor/lower-d - element/neighbor/lower-d Jacobian
      48             :    */
      49             :   virtual void computeJacobian() override;
      50             : 
      51             :   /**
      52             :    * Computes d-residual / d-jvar...
      53             :    */
      54             :   virtual void computeOffDiagJacobian(unsigned int jvar) override;
      55             : 
      56             : protected:
      57             :   /**
      58             :    * Computes the Lower part of residual for the variable on the lower-d element
      59             :    */
      60             :   virtual void computeLowerDResidual();
      61             : 
      62             :   /**
      63             :    * Method for computing the Lower part of residual at quadrature points, to be filled in \p
      64             :    * residual
      65             :    */
      66             :   virtual Real computeLowerDQpResidual() = 0;
      67             : 
      68             :   /**
      69             :    * Computes one of the five pieces of Jacobian involving lower-d
      70             :    */
      71             :   virtual void computeLowerDJacobian(Moose::ConstraintJacobianType jacobian_type);
      72             : 
      73             :   /**
      74             :    * Computes one of the five pieces of Jacobian involving lower-d at quadrature points
      75             :    */
      76             :   virtual Real computeLowerDQpJacobian(Moose::ConstraintJacobianType jacobian_type) = 0;
      77             : 
      78             :   /**
      79             :    * Computes one of the five pieces of off-diagonal Jacobian involving lower-d
      80             :    */
      81             :   virtual void computeOffDiagLowerDJacobian(Moose::ConstraintJacobianType type,
      82             :                                             const MooseVariableFEBase & jvar);
      83             : 
      84             :   /**
      85             :    * Computes one of the five pieces of off-diagonal Jacobian involving lower-d at quadrature points
      86             :    */
      87           0 :   virtual Real computeLowerDQpOffDiagJacobian(Moose::ConstraintJacobianType /*type*/,
      88             :                                               const MooseVariableFEBase & /*jvar*/)
      89             :   {
      90           0 :     return 0;
      91             :   }
      92             : 
      93             :   /**
      94             :    * Put necessary evaluations depending on qp but independent on test functions here
      95             :    */
      96       24576 :   virtual void initLowerDQpResidual() {}
      97             : 
      98             :   /**
      99             :    * Put necessary evaluations depending on qp but independent on test and shape functions here
     100             :    */
     101       61440 :   virtual void initLowerDQpJacobian(Moose::ConstraintJacobianType) {}
     102             : 
     103             :   /**
     104             :    * Put necessary evaluations depending on qp but independent on test and shape functions here for
     105             :    * off-diagonal Jacobian assembly
     106             :    */
     107           0 :   virtual void initLowerDQpOffDiagJacobian(Moose::ConstraintJacobianType,
     108             :                                            const MooseVariableFEBase &)
     109             :   {
     110           0 :   }
     111             : 
     112             :   /// Variable this kernel operates on
     113             :   const MooseVariable & _lowerd_var;
     114             :   /// Holds the current solution at the current quadrature point on the face.
     115             :   const VariableValue & _lambda;
     116             :   /// Shape functions
     117             :   const VariablePhiValue & _phi_lambda;
     118             :   /// test functions
     119             :   const VariableTestValue & _test_lambda;
     120             : };

Generated by: LCOV version 1.14