https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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{
20public:
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
36template <typename Derived>
37KOKKOS_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
45template <typename Derived>
46KOKKOS_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}
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
This kernel implements the Laplacian operator: $\nabla u \cdot \nabla \phi_i$.
static InputParameters validParams()
KOKKOS_FUNCTION Real computeQpJacobian(const unsigned int i, const unsigned int j, const unsigned int qp, AssemblyDatum &datum) const
KOKKOS_FUNCTION Real computeQpResidual(const unsigned int i, const unsigned int qp, AssemblyDatum &datum) const
KokkosDiffusion(const InputParameters &parameters)
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels.
The base class for a user to derive their own Kokkos kernels.
const VariablePhiGradient _grad_phi
Gradient of the current shape function.
const VariableTestGradient _grad_test
Gradient of the current test function.
const VariableGradient _grad_u
Gradient of the current solution at quadrature points.