https://mooseframework.inl.gov
KokkosDiffusion.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 
12 #include "KokkosKernel.h"
13 
19 {
20 public:
22 
24 
25  template <typename Derived>
26  KOKKOS_FUNCTION Real computeQpResidual(const unsigned int i,
27  const unsigned int qp,
28  AssemblyDatum & datum) const;
29  template <typename Derived>
30  KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i,
31  const unsigned int j,
32  const unsigned int qp,
33  AssemblyDatum & datum) const;
34 };
35 
36 template <typename Derived>
37 KOKKOS_FUNCTION Real
39  const unsigned int qp,
40  AssemblyDatum & datum) const
41 {
42  return _grad_u(datum, qp) * _grad_test(datum, i, qp);
43 }
44 
45 template <typename Derived>
46 KOKKOS_FUNCTION Real
48  const unsigned int j,
49  const unsigned int qp,
50  AssemblyDatum & datum) const
51 {
52  return _grad_phi(datum, j, qp) * _grad_test(datum, i, qp);
53 }
This kernel implements the Laplacian operator: $ u $.
KOKKOS_FUNCTION Real computeQpResidual(const unsigned int i, const unsigned int qp, AssemblyDatum &datum) const
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
const VariableGradient _grad_u
Gradient of the current solution at quadrature points.
Definition: KokkosKernel.h:193
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i, const unsigned int j, const unsigned int qp, AssemblyDatum &datum) const
static InputParameters validParams()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableTestGradient _grad_test
Gradient of the current test function.
Definition: KokkosKernel.h:177
KokkosDiffusion(const InputParameters &parameters)
const VariablePhiGradient _grad_phi
Gradient of the current shape function.
Definition: KokkosKernel.h:185
The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels...
Definition: KokkosDatum.h:364
The base class for a user to derive their own Kokkos kernels.
Definition: KokkosKernel.h:39