https://mooseframework.inl.gov
Loading...
Searching...
No Matches
KokkosLinearFVKernel.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://www.mooseframework.org
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
13
14#include "BlockRestrictable.h"
15
16namespace Moose::Kokkos
17{
18
19class FVDatum;
20
25{
26public:
28
31
37 template <typename Derived>
38 KOKKOS_FUNCTION Real computeMatrixContribution(const FVDatum &) const
39 {
40 ::Kokkos::abort("Default computeMatrixContribution() should never be called. Make sure you "
41 "properly redefined this method in your class without typos.");
42
43 return 0;
44 }
45
46 template <typename Derived>
47 KOKKOS_FUNCTION Real computeNeighborMatrixContribution(const FVDatum &) const
48 {
49 ::Kokkos::abort("Default computeNeighborMatrixContribution() should never be called. Make sure "
50 "you properly redefined this method in your class without typos.");
51
52 return 0;
53 }
55
62 template <typename Derived>
64 {
65 return &LinearFVKernel::computeMatrixContribution<Derived>;
66 }
67
68 template <typename Derived>
70 {
71 return &LinearFVKernel::computeNeighborMatrixContribution<Derived>;
72 }
74};
75
76} // namespace Moose::Kokkos
An interface that restricts an object to subdomains via the 'blocks' input parameter.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Device-side geometric context for finite volume kernels and boundary conditions.
Base class for Kokkos linear finite volume kernels that contribute to the linear system.
static auto defaultMatrixContribution()
Functions used to check if users have overriden the hook methods, whose calculations can be skipped w...
LinearFVKernel(const InputParameters &parameters)
static InputParameters validParams()
KOKKOS_FUNCTION Real computeMatrixContribution(const FVDatum &) const
Default methods to prevent compile errors when matrix contributions are not defined in the derived cl...
KOKKOS_FUNCTION Real computeNeighborMatrixContribution(const FVDatum &) const
LinearFVKernel(const LinearFVKernel &object)
Base class for Kokkos objects that contribute to a linear system, i.e.