LCOV - code coverage report
Current view: top level - include/fvkernels - INSFVFluxKernel.h (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 1 4 25.0 %
Date: 2025-08-14 10:14:56 Functions: 1 4 25.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 "FVFluxKernel.h"
      13             : #include "INSFVMomentumResidualObject.h"
      14             : 
      15             : /**
      16             :  * A flux kernel that momentum residual objects that add non-advection flux terms, or more
      17             :  * specifically do not call _rc_uo.getVelocity, should inherit from
      18             :  */
      19             : class INSFVFluxKernel : public FVFluxKernel, public INSFVMomentumResidualObject
      20             : {
      21             : public:
      22             :   static InputParameters validParams();
      23             :   INSFVFluxKernel(const InputParameters & params);
      24             : 
      25             :   using INSFVMomentumResidualObject::gatherRCData;
      26           0 :   void gatherRCData(const Elem &) override final {}
      27             : 
      28       19253 :   virtual ~INSFVFluxKernel() = default;
      29             : 
      30             :   using FVFluxKernel::computeResidual;
      31             :   void computeResidual(const FaceInfo & fi) override final;
      32             :   using FVFluxKernel::computeJacobian;
      33             :   void computeJacobian(const FaceInfo & fi) override final;
      34             :   using FVFluxKernel::computeResidualAndJacobian;
      35             :   void computeResidualAndJacobian(const FaceInfo & fi) override final;
      36             : 
      37             : protected:
      38             :   ADReal computeQpResidual() override final;
      39             : 
      40             :   /**
      41             :    * Process into the system residual
      42             :    */
      43             :   void addResidual(const Real residual);
      44             : 
      45             :   /**
      46             :    * Process into either the system residual or Jacobian
      47             :    */
      48             :   void addResidualAndJacobian(const ADReal & residual);
      49             : 
      50             :   /// Compute the contribution which goes into the residual of the segregated system. This
      51             :   /// needs to accomodate the different linearization approaches needed to get the suitable
      52             :   /// system matrix contributions when the Jacobian assembly routine is called.
      53           0 :   virtual ADReal computeSegregatedContribution()
      54             :   {
      55           0 :     mooseError("computeSegregatedContribution not implemented for ",
      56             :                this->type(),
      57             :                ". This function needs to be implemented to be able to use this object with a "
      58             :                "segregated solver!");
      59             :   }
      60             : };

Generated by: LCOV version 1.14