https://mooseframework.inl.gov
KokkosHeatConduction.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 "KokkosKernelGrad.h"
13 
18 {
20 
21 public:
23 
25 
26  template <typename Derived>
27  KOKKOS_FUNCTION Real3 computeQpResidual(const unsigned int qp, AssemblyDatum & datum) const;
28  template <typename Derived>
29  KOKKOS_FUNCTION Real3 computeQpJacobian(const unsigned int j,
30  const unsigned int qp,
31  AssemblyDatum & datum) const;
32 
33 private:
36 };
37 
38 template <typename Derived>
39 KOKKOS_FUNCTION Moose::Kokkos::Real3
40 KokkosHeatConduction::computeQpResidual(const unsigned int qp, AssemblyDatum & datum) const
41 {
42  return _thermal_conductivity(datum, qp) * _grad_u(datum, qp);
43 }
44 
45 template <typename Derived>
46 KOKKOS_FUNCTION Moose::Kokkos::Real3
48  const unsigned int qp,
49  AssemblyDatum & datum) const
50 {
51  Real3 jac = _thermal_conductivity(datum, qp) * _grad_phi(datum, j, qp);
53  jac += _d_thermal_conductivity_dT(datum, qp) * _phi(datum, j, qp) * _grad_u(datum, qp);
54  return jac;
55 }
Vector3< Real > Real3
Kokkos kernel for a heat conduction term with an isotropic conductivity.
Moose::Kokkos::MaterialProperty< Real > _thermal_conductivity
const InputParameters & parameters() const
KOKKOS_FUNCTION Real3 computeQpJacobian(const unsigned int j, const unsigned int qp, AssemblyDatum &datum) const
const VariableGradient _grad_u
Moose::Kokkos::MaterialProperty< Real > _d_thermal_conductivity_dT
static InputParameters validParams()
const VariablePhiGradient _grad_phi
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const VariablePhiValue _phi
KOKKOS_FUNCTION Real3 computeQpResidual(const unsigned int qp, AssemblyDatum &datum) const
KokkosHeatConduction(const InputParameters &parameters)