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  KOKKOS_FUNCTION Real computeQpResidual(const unsigned int i,
26  const unsigned int qp,
27  ResidualDatum & datum) const;
28  KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i,
29  const unsigned int j,
30  const unsigned int qp,
31  ResidualDatum & datum) const;
32 };
33 
34 KOKKOS_FUNCTION inline Real
36  const unsigned int qp,
37  ResidualDatum & datum) const
38 {
39  return _grad_u(datum, qp) * _grad_test(datum, i, qp);
40 }
41 
42 KOKKOS_FUNCTION inline Real
44  const unsigned int j,
45  const unsigned int qp,
46  ResidualDatum & datum) const
47 {
48  return _grad_phi(datum, j, qp) * _grad_test(datum, i, qp);
49 }
This kernel implements the Laplacian operator: $ u $.
KOKKOS_FUNCTION Real computeQpResidual(const unsigned int i, const unsigned int qp, ResidualDatum &datum) const
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i, const unsigned int j, const unsigned int qp, ResidualDatum &datum) const
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:175
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:159
KokkosDiffusion(const InputParameters &parameters)
const VariablePhiGradient _grad_phi
Gradient of the current shape function.
Definition: KokkosKernel.h:167
The base class for a user to derive their own Kokkos kernels.
Definition: KokkosKernel.h:40
The Kokkos object that holds thread-private data in the parallel operations of Kokkos residual object...
Definition: KokkosDatum.h:245