https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
21public:
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
50
53
56
59
65
71
75 virtual Real computeBoundaryFlux(const LinearFVBoundaryCondition & bc);
76
77protected:
86 const FaceInfo * fi,
88 bool correct_skewness = false) const;
89
92
95
98
102
106
109
112 DenseVector<dof_id_type> _dof_indices;
113
115 DenseMatrix<Real> _matrix_contribution;
116
118 DenseVector<Real> _rhs_contribution;
119};
An interface for producers of functor face arguments, e.g.
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition FaceInfo.h:38
VarFaceNeighbors
This enum is used to indicate which side(s) of a face a particular variable is defined on.
Definition FaceInfo.h:53
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Base class for boundary conditions for linear FV systems.
Finite volume kernel that contributes approximations of discretized face flux terms to the matrix and...
virtual Real computeNeighborMatrixContribution()=0
Computes the system matrix contribution from the neighbor side on an internal face.
bool _cached_matrix_contribution
If we already built the matrix contribution.
bool _cached_rhs_contribution
If we already built the right hand side contribution.
FaceInfo::VarFaceNeighbors _current_face_type
Face ownership information for the current face.
virtual Real computeBoundaryFlux(const LinearFVBoundaryCondition &bc)
Computes the flux from this kernel on a boundary.
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.
DenseMatrix< Real > _matrix_contribution
Cache for a batch of matrix contributions for faster assembly.
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc)=0
Computes the right hand side contribution from a boundary face.
virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &bc)=0
Computes the matrix contribution from a boundary face.
virtual bool hasFaceSide(const FaceInfo &fi, bool fi_elem_side) const override
virtual void setupFaceData(const FaceInfo *face_info)
Set the current FaceInfo object.
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.
DenseVector< dof_id_type > _dof_indices
A vector of dof indices that describe where to add the matrix and right hand side batch contribution.
virtual void addRightHandSideContribution() override
Add this object's contribution to the system right hand side.
virtual void addMatrixContribution() override
Add this object's contribution to the system matrix.
Real _current_face_area
The current, coordinate system specific face area.
virtual Real computeElemMatrixContribution()=0
Computes the system matrix contribution from an element side on an internal face.
virtual Real computeElemRightHandSideContribution()=0
Computes the right hand side contribution from the element side on an internal face.
const bool _force_boundary_execution
Whether to force execution of this kernel on all external boundaries.
const FaceInfo * _current_face_info
Pointer to the face info we are operating on right now.
void setCurrentFaceArea(const Real area)
Set the coordinate system specific face area for the assembly.
static InputParameters validParams()
Base class for finite volume kernels that contribute to a linear systems.
A structure defining a "face" evaluation calling argument for Moose functors.