LCOV - code coverage report
Current view: top level - include/fvkernels - INSFVElementalKernel.h (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 2 7 28.6 %
Date: 2025-08-14 10:14:56 Functions: 2 6 33.3 %
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 "FVElementalKernel.h"
      13             : #include "INSFVMomentumResidualObject.h"
      14             : 
      15             : /**
      16             :  * An elemental kernel that momentum residual objects that add body forces should inherit from
      17             :  */
      18             : class INSFVElementalKernel : public FVElementalKernel, public INSFVMomentumResidualObject
      19             : {
      20             : public:
      21             :   static InputParameters validParams();
      22             :   INSFVElementalKernel(const InputParameters & params);
      23             : 
      24             :   using INSFVMomentumResidualObject::gatherRCData;
      25           0 :   void gatherRCData(const FaceInfo &) override final {}
      26             : 
      27        2704 :   virtual ~INSFVElementalKernel() = default;
      28             : 
      29             :   void computeResidual() override;
      30             :   void computeJacobian() override;
      31             :   using FVElementalKernel::computeOffDiagJacobian;
      32     3249066 :   void computeOffDiagJacobian() override final {}
      33             :   void computeResidualAndJacobian() override;
      34             : 
      35             : protected:
      36           0 :   ADReal computeQpResidual() override final
      37             :   {
      38           0 :     mooseError("INSFVElementalKernels must implement gatherRCData and not computeQpResidual");
      39             :   }
      40             : 
      41             :   /// Compute the contribution which goes into the residual of the segregated system. This
      42             :   /// needs to accomodate the different linearization approaches needed to get the suitable
      43             :   /// system matrix contributions when the Jacobian assembly routine is called.
      44           0 :   virtual ADReal computeSegregatedContribution()
      45             :   {
      46           0 :     mooseError(
      47             :         this->type(),
      48             :         " needs to implement computeSegregatedContribution to be usable with a segregated solver!");
      49             :   }
      50             : 
      51             :   /**
      52             :    * Process into either the system residual or Jacobian
      53             :    */
      54             :   void addResidualAndJacobian(const ADReal & residual, dof_id_type dof);
      55             : };

Generated by: LCOV version 1.14