https://mooseframework.inl.gov
LinearFVFluxKernel.h
Go to the documentation of this file.
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 "FaceArgInterface.h"
14 
20 {
21 public:
23 
28  LinearFVFluxKernel(const InputParameters & params);
29 
30  virtual void addMatrixContribution() override;
31 
32  virtual void addRightHandSideContribution() override;
33 
34  virtual bool hasFaceSide(const FaceInfo & fi, bool fi_elem_side) const override;
35 
40  virtual void setupFaceData(const FaceInfo * face_info);
41 
46  void setCurrentFaceArea(const Real area) { _current_face_area = area; };
47 
49  virtual Real computeElemMatrixContribution() = 0;
50 
53 
56 
59 
65 
71 
72 protected:
81  const FaceInfo * fi,
83  bool correct_skewness = false) const;
84 
87 
90 
93 
97 
101 
104 
107  DenseVector<dof_id_type> _dof_indices;
108 
111 
113  DenseVector<Real> _rhs_contribution;
114 };
virtual void addMatrixContribution() override
Add this object&#39;s contribution to the system matrix.
Base class for boundary conditions for linear FV systems.
Base class for finite volume kernels that contribute to a linear systems.
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false) const
Determine the single sided face argument when evaluating a functor on a face.
Finite volume kernel that contributes approximations of discretized face flux terms to the matrix and...
virtual void setupFaceData(const FaceInfo *face_info)
Set the current FaceInfo object.
virtual Real computeElemMatrixContribution()=0
Computes the system matrix contribution from an element side on an internal face. ...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
FaceInfo::VarFaceNeighbors _current_face_type
Face ownership information for the current face.
const bool _force_boundary_execution
Whether to force execution of this kernel on all external boundaries.
DenseVector< Real > _rhs_contribution
Cache for a batch of vector contributions for faster assembly.
virtual Real computeNeighborRightHandSideContribution()=0
Computes the right hand side contribution from the neighbor side on an internal face.
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:36
static InputParameters validParams()
const FaceInfo * _current_face_info
Pointer to the face info we are operating on right now.
A structure defining a "face" evaluation calling argument for Moose functors.
An interface for producers of functor face arguments, e.g.
VarFaceNeighbors
This enum is used to indicate which side(s) of a face a particular variable is defined on...
Definition: FaceInfo.h:48
virtual Real computeNeighborMatrixContribution()=0
Computes the system matrix contribution from the neighbor side on an internal face.
LimiterType
Definition: Limiter.h:26
virtual bool hasFaceSide(const FaceInfo &fi, bool fi_elem_side) const override
void setCurrentFaceArea(const Real area)
Set the coordinate system specific face area for the assembly.
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc)=0
Computes the matrix contribution from a boundary face.
bool _cached_rhs_contribution
If we already built the right hand side contribution.
DenseVector< dof_id_type > _dof_indices
A vector of dof indices that describe where to add the matrix and right hand side batch contribution...
LinearFVFluxKernel(const InputParameters &params)
Class constructor.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Real computeElemRightHandSideContribution()=0
Computes the right hand side contribution from the element side on an internal face.
bool _cached_matrix_contribution
If we already built the matrix contribution.
Real _current_face_area
The current, coordinate system specific face area.
virtual void addRightHandSideContribution() override
Add this object&#39;s contribution to the system right hand side.
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc)=0
Computes the right hand side contribution from a boundary face.
DenseMatrix< Real > _matrix_contribution
Cache for a batch of matrix contributions for faster assembly.