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

Generated by: LCOV version 1.14