60 template <
typename Derived>
64 template <
typename Derived>
68 template <
typename Derived>
72 template <
typename Derived>
80 template <
typename Derived>
83 template <
typename Derived>
85 template <
typename Derived>
87 const FVDatum & datum,
const int bc_index,
const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const;
88 template <
typename Derived>
90 template <
typename Derived>
92 const FVDatum & datum,
const int bc_index,
const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const;
100 template <
typename Derived>
104 return &LinearFVFluxKernel::computeInternalMatrixContribution<Derived>;
107 template <
typename Derived>
110 return &LinearFVFluxKernel::computeInternalNeighborMatrixContribution<Derived>;
113 template <
typename Derived>
116 return &LinearFVFluxKernel::computeBoundaryMatrixContribution<Derived>;
155 const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const;
158 const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const;
161 const int bc_index,
const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const;
164 const int bc_index,
const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const;
182 KOKKOS_FUNCTION
inline bool 188 const auto & sys = kokkosSystem(
_var.
sys());
192 KOKKOS_FUNCTION
inline bool 195 return bc_index >= 0 &&
_bc_index.isAlloc() &&
200 KOKKOS_FUNCTION
inline Real 202 const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const 204 KOKKOS_ASSERT(bc_index >= 0);
205 return _bc_data[bc_index].value.coefficient[bc_face_index];
208 KOKKOS_FUNCTION
inline Real 210 const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const 212 KOKKOS_ASSERT(bc_index >= 0);
213 return _bc_data[bc_index].value.source[bc_face_index];
216 KOKKOS_FUNCTION
inline Real 218 const int bc_index,
const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const 220 KOKKOS_ASSERT(bc_index >= 0);
221 return _bc_data[bc_index].normal_gradient.coefficient[bc_face_index];
224 KOKKOS_FUNCTION
inline Real 226 const MOOSE_KOKKOS_INDEX_TYPE bc_face_index)
const 228 KOKKOS_ASSERT(bc_index >= 0);
229 return _bc_data[bc_index].normal_gradient.source[bc_face_index];
232 template <
typename Derived>
236 ::Kokkos::abort(
"Default computeInternalMatrixContribution() should never be called. Make sure " 237 "you properly redefined this method in your class without typos.");
242 template <
typename Derived>
246 ::Kokkos::abort(
"Default computeInternalNeighborMatrixContribution() should never be called. " 247 "Make sure you properly redefined this method in your class without typos.");
252 template <
typename Derived>
256 const MOOSE_KOKKOS_INDEX_TYPE)
const 258 ::Kokkos::abort(
"Default computeBoundaryMatrixContribution() should never be called. Make sure " 259 "you properly redefined this method in your class without typos.");
264 template <
typename Derived>
268 ::Kokkos::abort(
"Default computeInternalRightHandSideContribution() should never be called. Make " 269 "sure you properly redefined this method in your class without typos.");
274 template <
typename Derived>
278 const MOOSE_KOKKOS_INDEX_TYPE)
const 280 ::Kokkos::abort(
"Default computeBoundaryRightHandSideContribution() should never be called. Make " 281 "sure you properly redefined this method in your class without typos.");
286 template <
typename Derived>
290 const Derived & kernel)
const 297 const auto & sys = kokkosSystem(
_var.
sys());
298 kernel.accumulateTaggedVector(
299 kernel.template computeInternalRightHandSideContribution<Derived>(datum),
300 sys.getElemLocalDofIndex(elem, 0,
_var.
var()));
303 template <
typename Derived>
307 const Derived & kernel)
const 314 const auto & sys = kokkosSystem(
_var.
sys());
315 kernel.accumulateTaggedVector(kernel.template computeBoundaryRightHandSideContribution<Derived>(
316 datum, bc_index, bc_face_index),
317 sys.getElemLocalDofIndex(elem, 0,
_var.
var()));
320 template <
typename Derived>
329 const auto var_num =
_var.
var();
330 const auto & sys = kokkosSystem(
_var.
sys());
331 const auto row = sys.getElemLocalDofIndex(elem, 0, var_num);
332 kernel.accumulateTaggedMatrix(kernel.template computeInternalMatrixContribution<Derived>(datum),
334 sys.getElemGlobalDofIndex(elem, 0, var_num));
335 kernel.accumulateTaggedMatrix(
336 kernel.template computeInternalNeighborMatrixContribution<Derived>(datum),
338 sys.getElemGlobalDofIndex(datum.
neighborID(), 0, var_num));
341 template <
typename Derived>
350 const auto var_num =
_var.
var();
351 const auto & sys = kokkosSystem(
_var.
sys());
352 const auto row = sys.getElemLocalDofIndex(elem, 0, var_num);
353 kernel.accumulateTaggedMatrix(
354 kernel.template computeBoundaryMatrixContribution<Derived>(datum, bc_index, bc_face_index),
356 sys.getElemGlobalDofIndex(elem, 0, var_num));
KOKKOS_FUNCTION bool hasBoundaryData(const FVDatum &datum, const int bc_index) const
Whether this boundary face has a boundary condition data provider.
KOKKOS_FUNCTION unsigned int sys(unsigned int comp=0) const
Get the system number of a component.
LinearFVFluxKernel(const InputParameters ¶meters)
virtual void computeRightHandSide() override
Compute the right-hand side contributions of this object.
Tag dispatch type for boundary-face right-hand side computation.
dof_id_type ContiguousElementID
KOKKOS_FUNCTION Real computeBoundaryRightHandSideContribution(const FVDatum &datum, const int bc_index, const MOOSE_KOKKOS_INDEX_TYPE bc_face_index) const
std::unique_ptr< DispatcherBase > _internal_rhs_dispatcher
KOKKOS_FUNCTION ContiguousElementID elemID() const
Get the contiguous element ID.
static InputParameters validParams()
const InputParameters & parameters() const
Get the parameters of the object.
KOKKOS_FUNCTION bool hasFaceNeighbor(const FVDatum &datum) const
Whether this face has a mesh neighbor on a subdomain where this kernel's variable is active...
static auto defaultInternalMatrixContribution()
Functions used to check if users have overriden the matrix hook methods, whose calculations can be sk...
KOKKOS_FUNCTION Real computeInternalRightHandSideContribution(const FVDatum &datum) const
virtual bool hasInternalRightHandSideContribution() const
Whether this kernel has nonzero internal-face RHS contributions.
KOKKOS_FUNCTION Real computeInternalMatrixContribution(const FVDatum &datum) const
Default methods to prevent compile errors when matrix/RHS contributions are not defined in the derive...
KOKKOS_FUNCTION Real boundaryValueCoefficient(const int bc_index, const MOOSE_KOKKOS_INDEX_TYPE bc_face_index) const
Boundary value coefficient for this boundary face.
KOKKOS_FUNCTION Real boundaryNormalGradientCoefficient(const int bc_index, const MOOSE_KOKKOS_INDEX_TYPE bc_face_index) const
Boundary normal gradient coefficient for this boundary face.
KOKKOS_FUNCTION bool hasNeighbor() const
Get whether the current side has a neighbor.
static auto defaultInternalNeighborMatrixContribution()
std::unique_ptr< DispatcherBase > _boundary_matrix_dispatcher
Directed boundary side and its compact boundary condition and BC-local face indices.
KOKKOS_FUNCTION unsigned int components() const
Get the number of components.
KOKKOS_FUNCTION unsigned int side() const
Get the side index.
Array< LinearFVBoundaryCondition::BoundaryData > _bc_data
Boundary condition data handles indexed by compact boundary condition index.
Array< FaceID > _internal_face_ids
Directed internal element sides with an active variable on the neighbor element.
MOOSE_KOKKOS_INDEX_TYPE ThreadID
Base class for Kokkos linear finite volume kernels that contribute on faces (flux terms)...
Tag dispatch type for internal-face right-hand side computation.
Array< BoundaryFaceID > _boundary_face_ids
Directed boundary element sides with active Kokkos boundary data.
bool operator<(const BoundaryFaceID &other) const
virtual bool needsBoundaryNormalGradientData() const
Whether this kernel needs boundary normal gradient data from its boundary conditions.
Base class for Kokkos linear finite volume kernels that contribute to the linear system.
Variable _var
Kokkos variable.
KOKKOS_FUNCTION Real computeBoundaryMatrixContribution(const FVDatum &datum, const int bc_index, const MOOSE_KOKKOS_INDEX_TYPE bc_face_index) const
MOOSE_KOKKOS_INDEX_TYPE bc_face_index
virtual void computeMatrix() override
Compute the matrix contributions of this object.
KOKKOS_FUNCTION const Mesh & kokkosMesh() const
Get the const reference of the Kokkos mesh.
Tag dispatch type for boundary-face matrix computation.
std::unique_ptr< DispatcherBase > _internal_matrix_dispatcher
KOKKOS_FUNCTION ContiguousSubdomainID neighborSubdomain() const
Get the contiguous neighbor subdomain ID.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static auto defaultBoundaryMatrixContribution()
Tag dispatch type for internal-face matrix computation.
KOKKOS_FUNCTION void operator()(InternalRightHandSideLoop, const ThreadID tid, const Derived &kernel) const
Device-side geometric context for finite volume kernels and boundary conditions.
virtual bool needsBoundaryValueData() const
Whether this kernel needs boundary value data from its boundary conditions.
Array2D< int > _bc_index
Setup/debug map from (side, element) to compact boundary condition index.
KOKKOS_FUNCTION unsigned int var(unsigned int comp=0) const
Get the variable number of a component.
std::unique_ptr< DispatcherBase > _boundary_rhs_dispatcher
KOKKOS_FUNCTION Real boundaryNormalGradientSource(const int bc_index, const MOOSE_KOKKOS_INDEX_TYPE bc_face_index) const
Boundary normal gradient source for this boundary face.
virtual void initialSetup() override
Gets called at the beginning of the simulation before this object is asked to do its job...
KOKKOS_FUNCTION Real boundaryValueSource(const int bc_index, const MOOSE_KOKKOS_INDEX_TYPE bc_face_index) const
Boundary value source for this boundary face.
KOKKOS_FUNCTION Real computeInternalNeighborMatrixContribution(const FVDatum &datum) const
KOKKOS_FUNCTION ContiguousElementID neighborID() const
Get the contiguous neighbor element ID.