LCOV - code coverage report
Current view: top level - include/linearfvkernels - LinearFVElementalKernel.h (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 2bf808 Lines: 1 1 100.0 %
Date: 2025-07-17 01:28:37 Functions: 1 1 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 "LinearFVKernel.h"
      13             : #include "ElemInfo.h"
      14             : 
      15             : /**
      16             :  * Finite volume kernel that contributes approximations of volumetric integral terms to the matrix
      17             :  * and right hand side of a linear system.
      18             :  */
      19             : class LinearFVElementalKernel : public LinearFVKernel
      20             : {
      21             : public:
      22             :   static InputParameters validParams();
      23             : 
      24             :   /**
      25             :    * Class constructor.
      26             :    * @param parameters The InputParameters for the object
      27             :    */
      28             :   LinearFVElementalKernel(const InputParameters & params);
      29             : 
      30             :   virtual void addMatrixContribution() override;
      31             : 
      32             :   virtual void addRightHandSideContribution() override;
      33             : 
      34             :   /**
      35             :    * Set the current ElemInfo object.
      36             :    * @param elem_info The new ElemInfo which will be used as the current
      37             :    */
      38             :   virtual void setCurrentElemInfo(const ElemInfo * elem_info);
      39             : 
      40             :   /**
      41             :    * Set the coordinate system specific volume, the multiplication with
      42             :    * the transformation factor is done outside of the kernel.
      43             :    * @param volume the new coordinate specific volume
      44             :    */
      45     1619506 :   void setCurrentElemVolume(const Real volume) { _current_elem_volume = volume; }
      46             : 
      47             :   /// Computes the system matrix contribution for the given variable on the current element
      48             :   virtual Real computeMatrixContribution() = 0;
      49             : 
      50             :   /// Computes the right hand side contribution for the given variable on the current element
      51             :   virtual Real computeRightHandSideContribution() = 0;
      52             : 
      53             : protected:
      54             :   /// Pointer to the current element info
      55             :   const ElemInfo * _current_elem_info;
      56             : 
      57             :   /// The coordinate-specific element volume
      58             :   Real _current_elem_volume;
      59             : 
      60             :   /// The dof index for the current variable associated with the element
      61             :   dof_id_type _dof_id;
      62             : };

Generated by: LCOV version 1.14