17 params.
addParam<
bool>(
"force_boundary_execution",
19 "Whether to force execution of this object on all external boundaries.");
27 _current_face_info(nullptr),
28 _current_face_type(
FaceInfo::VarFaceNeighbors::NEITHER),
29 _cached_matrix_contribution(false),
30 _cached_rhs_contribution(false),
31 _force_boundary_execution(getParam<bool>(
"force_boundary_execution")),
33 _matrix_contribution(2, 2),
34 _rhs_contribution(2, 0.0)
78 "We should only have one boundary on every face. Current face center: " +
99 (*matrix).add(dof_id_elem, dof_id_elem, matrix_contribution);
103 const auto dof_id_neighbor =
108 (*matrix).add(dof_id_neighbor, dof_id_neighbor, matrix_contribution);
145 "We should only have one boundary on every face.");
163 (*vector).add(dof_id_elem, rhs_contribution);
167 const auto dof_id_neighbor =
171 (*vector).add(dof_id_neighbor, rhs_contribution);
190 const bool correct_skewness)
const 192 mooseAssert(fi,
"FaceInfo should not be null!");
193 return makeFace(*fi, limiter_type,
true, correct_skewness);
virtual void addMatrixContribution() override
Add this object's contribution to the system matrix.
const unsigned int _var_num
Cache for the variable number.
Base class for boundary conditions for linear FV systems.
const std::set< BoundaryID > & boundaryIDs() const
Const getter for every associated boundary ID.
Base class for finite volume kernels that contribute to a linear systems.
virtual void zero() override final
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.
const ElemInfo * neighborInfo() const
const Point & faceCentroid() const
Returns the coordinates of the face centroid.
void setupFaceData(const FaceInfo *face_info, const FaceInfo::VarFaceNeighbors face_type)
Set current face info.
MooseLinearVariableFV< Real > & _var
Reference to the linear finite volume variable.
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. ...
const ElemInfo * elemInfo() const
LinearFVBoundaryCondition * getBoundaryCondition(const BoundaryID bd_id) const
Get the boundary condition object which corresponds to the given boundary ID.
static InputParameters validParams()
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.
std::vector< NumericVector< Number > * > _vectors
Pointers to the vectors that need contributions from this kernel.
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 ...
static InputParameters validParams()
const FaceInfo * _current_face_info
Pointer to the face info we are operating on right now.
std::vector< SparseMatrix< Number > * > _matrices
Pointers to the matrices that need contributions from this kernel.
A structure defining a "face" evaluation calling argument for Moose functors.
An interface for producers of functor face arguments, e.g.
virtual Real computeNeighborMatrixContribution()=0
Computes the system matrix contribution from the neighbor side on an internal face.
virtual bool hasFaceSide(const FaceInfo &fi, bool fi_elem_side) const override
std::string stringify(const T &t)
conversion to string
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...
const std::vector< std::vector< dof_id_type > > & dofIndices() const
LinearFVFluxKernel(const InputParameters ¶ms)
Class constructor.
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.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.
virtual void addRightHandSideContribution() override
Add this object'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.
const unsigned int _sys_num
Cache for the system number.
SubdomainID subdomain_id() const
We return the subdomain ID of the corresponding libmesh element.
Moose::FaceArg makeFace(const FaceInfo &fi, const Moose::FV::LimiterType limiter_type, const bool elem_is_upwind, const bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
Create a functor face argument from provided component arguments.
DenseMatrix< Real > _matrix_contribution
Cache for a batch of matrix contributions for faster assembly.
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const
Returns which side(s) the given variable-system number pair is defined on for this face...