https://mooseframework.inl.gov
KokkosDatum.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 "KokkosTypes.h"
13 #include "KokkosAssembly.h"
14 #include "KokkosFESystem.h"
15 #include "KokkosVariable.h"
16 
17 namespace Moose::Kokkos
18 {
19 
24 class MeshDatum
25 {
26 public:
33  KOKKOS_FUNCTION
34  MeshDatum(ContiguousElementID elem, const unsigned int side, const Mesh & mesh);
35 
40  KOKKOS_FUNCTION const Mesh & mesh() const { return _mesh; }
41 
46  KOKKOS_FUNCTION const ElementInfo & elem() const { return _elem; }
47 
52  KOKKOS_FUNCTION ContiguousElementID elemID() const { return _elem.id; }
53 
58  KOKKOS_FUNCTION bool hasNeighbor() const;
59 
67  KOKKOS_FUNCTION const ElementInfo & neighbor() const { return _neighbor; }
68 
73  KOKKOS_FUNCTION ContiguousElementID neighborID() const { return _neighbor.id; }
74 
79  KOKKOS_FUNCTION unsigned int side() const { return _side; }
80 
85  KOKKOS_FUNCTION bool isSide() const { return _side != libMesh::invalid_uint; }
86 
91  KOKKOS_FUNCTION ContiguousSubdomainID subdomain() const { return _elem.subdomain; }
92 
97  KOKKOS_FUNCTION ContiguousSubdomainID neighborSubdomain() const { return _neighbor.subdomain; }
98 
99 protected:
113  static KOKKOS_FUNCTION ElementInfo neighborInfo(ContiguousElementID elem,
114  const unsigned int side,
115  const Mesh & mesh);
116 
120  const Mesh & _mesh;
121 
126 
130  const unsigned int _side = libMesh::invalid_uint;
131 
136 };
137 
138 KOKKOS_FUNCTION inline MeshDatum::MeshDatum(ContiguousElementID elem,
139  const unsigned int side,
140  const Mesh & mesh)
141  : _mesh(mesh),
142  _elem(elem != libMesh::DofObject::invalid_id ? _mesh.getElementInfo(elem) : ElementInfo{}),
143  _side(side),
144  _neighbor(neighborInfo(_elem.id, _side, _mesh))
145 {
146 }
147 
148 KOKKOS_FUNCTION inline bool
150 {
152 }
153 
154 KOKKOS_FUNCTION inline ElementInfo
155 MeshDatum::neighborInfo(ContiguousElementID elem, const unsigned int side, const Mesh & mesh)
156 {
158  return {};
159 
160  const auto neighbor = mesh.getNeighbor(elem, side);
162 }
163 
167 class FVDatum : public MeshDatum
168 {
169 public:
176  KOKKOS_FUNCTION
177  FVDatum(ContiguousElementID elem, const unsigned int side, const Mesh & mesh);
178 
184  KOKKOS_FUNCTION Real3 faceCentroid() const { return _mesh.getSideCentroid(_elem.id, _side); }
185 
191  KOKKOS_FUNCTION Real3 faceNormal() const { return _mesh.getSideNormal(_elem.id, _side); }
192 
198  KOKKOS_FUNCTION Real faceDCNMag() const
199  {
201  }
202 
208  KOKKOS_FUNCTION Real faceDCFMag() const
209  {
211  }
212 
218  KOKKOS_FUNCTION Real faceArea() const { return _mesh.getSideArea(_elem.id, _side); }
219 
225  KOKKOS_FUNCTION Real3 elementCentroid() const { return _mesh.getElementCentroid(_elem.id); }
226 
232  KOKKOS_FUNCTION Real elementVolume() const { return _mesh.getElementVolume(_elem.id); }
233 };
234 
235 KOKKOS_FUNCTION inline FVDatum::FVDatum(ContiguousElementID elem,
236  const unsigned int side,
237  const Mesh & mesh)
238  : MeshDatum(elem, side, mesh)
239 {
240 }
241 
245 class Datum : public MeshDatum
246 {
247 public:
255  KOKKOS_FUNCTION
257  const unsigned int side,
258  const Assembly & assembly,
259  const Array<FESystem> & systems);
260 
267  KOKKOS_FUNCTION
268  Datum(const ContiguousNodeID node, const Assembly & assembly, const Array<FESystem> & systems);
269 
274  KOKKOS_FUNCTION const Assembly & assembly() const { return _assembly; }
275 
281  KOKKOS_FUNCTION const FESystem & system(unsigned int sys) const { return _systems[sys]; }
282 
288  KOKKOS_FUNCTION dof_id_type extraElemID(unsigned int index) const
289  {
291  }
292 
297  KOKKOS_FUNCTION ContiguousNodeID node() const { return _node; }
298 
303  KOKKOS_FUNCTION unsigned int n_qps() const { return _n_qps; }
304 
309  KOKKOS_FUNCTION dof_id_type qpOffset() const { return _qp_offset; }
310 
317  KOKKOS_FUNCTION dof_id_type propertyIdx(const PropertyConstantOption constant_option,
318  const unsigned int qp) const;
319 
324  KOKKOS_FUNCTION bool isNodal() const { return _node != libMesh::DofObject::invalid_id; }
325 
331  KOKKOS_FUNCTION bool isNodalDefined(const Variable & var) const;
332 
341  KOKKOS_FUNCTION const Real33 & J(const unsigned int qp);
342 
348  KOKKOS_FUNCTION Real JxW(const unsigned int qp);
349 
355  KOKKOS_FUNCTION Real3 q_point(const unsigned int qp);
356 
362  KOKKOS_FUNCTION Real3 normals(const unsigned int qp);
363 
369  KOKKOS_FUNCTION void set_local_parallel(const unsigned int local_thread_id,
370  const unsigned int num_local_threads)
371  {
374  }
379  KOKKOS_FUNCTION unsigned int local_thread_id() const { return _local_thread_id; }
384  KOKKOS_FUNCTION unsigned int num_local_threads() const { return _num_local_threads; }
385 
386 protected:
391 
396 
401 
405  const unsigned int _n_qps = 1;
406 
411 
416 
417 private:
422  KOKKOS_FUNCTION void reinitTransform(const unsigned int qp);
423 
432  Real33 _J;
438 
441  unsigned int _local_thread_id = 0;
445  unsigned int _num_local_threads = 1;
446 };
447 
448 KOKKOS_FUNCTION inline Datum::Datum(const ContiguousElementID elem,
449  const unsigned int side,
450  const Assembly & assembly,
451  const Array<FESystem> & systems)
452  : MeshDatum(elem, side, assembly.kokkosMesh()),
453  _assembly(assembly),
454  _systems(systems),
455  _n_qps(!isSide() ? assembly.getNumQps(_elem) : assembly.getNumFaceQps(_elem, side)),
456  _qp_offset(!isSide() ? assembly.getQpOffset(_elem) : assembly.getQpFaceOffset(_elem, side)),
457  _elem_property_idx(!isSide() ? _elem.id - _mesh.getStartingContiguousElementID(_elem.subdomain)
458  : assembly.getElemFacePropertyIndex(_elem, _side))
459 {
460 }
461 
462 KOKKOS_FUNCTION inline Datum::Datum(const ContiguousNodeID node,
463  const Assembly & assembly,
464  const Array<FESystem> & systems)
465  : MeshDatum(libMesh::DofObject::invalid_id, libMesh::invalid_uint, assembly.kokkosMesh()),
466  _assembly(assembly),
467  _systems(systems),
468  _node(node)
469 {
470 }
471 
472 KOKKOS_FUNCTION inline dof_id_type
473 Datum::propertyIdx(const PropertyConstantOption constant_option, const unsigned int qp) const
474 {
475  dof_id_type idx = 0;
476 
477  if (constant_option == PropertyConstantOption::NONE)
478  idx = _qp_offset + qp;
479  else if (constant_option == PropertyConstantOption::ELEMENT)
481 
482  return idx;
483 }
484 
485 KOKKOS_FUNCTION inline bool
486 Datum::isNodalDefined(const Variable & var) const
487 {
488  if (!isNodal() || !var.nodal())
489  return false;
490 
491  return _systems[var.sys()].isNodalDefined(_node, var.var());
492 }
493 
494 KOKKOS_FUNCTION inline const Real33 &
495 Datum::J(const unsigned int qp)
496 {
497  if (!isNodal())
498  reinitTransform(qp);
499  else
501 
502  return _J;
503 }
504 
505 KOKKOS_FUNCTION inline Real
506 Datum::JxW(const unsigned int qp)
507 {
508  if (!isNodal())
509  reinitTransform(qp);
510  else
511  _JxW = 1;
512 
513  return _JxW;
514 }
515 
516 KOKKOS_FUNCTION inline Real3
517 Datum::q_point(const unsigned int qp)
518 {
519  if (!isNodal())
520  reinitTransform(qp);
521  else
523 
524  return _xyz;
525 }
526 
527 KOKKOS_FUNCTION inline Real3
528 Datum::normals(const unsigned int qp)
529 {
530  KOKKOS_ASSERT(isSide());
531 
532  if (isSide())
533  reinitTransform(qp);
534 
535  return _normal;
536 }
537 
538 KOKKOS_FUNCTION inline void
539 Datum::reinitTransform(const unsigned int qp)
540 {
541  if (_cached_qp == qp)
542  return;
543 
544  if (!isSide())
545  {
546  _J = _assembly.getJacobian(_elem, qp);
547  _JxW = _assembly.getJxW(_elem, qp);
548  _xyz = _assembly.getQPoint(_elem, qp);
549  }
550  else
552 
553  _cached_qp = qp;
554 }
555 
559 class AssemblyDatum : public Datum
560 {
561 public:
572  KOKKOS_FUNCTION
574  const unsigned int side,
575  const Assembly & assembly,
576  const Array<FESystem> & systems,
577  const Variable & ivar,
578  const unsigned int jvar,
579  const unsigned int comp = 0)
580  : Datum(elem, side, assembly, systems),
581  _tag(ivar.tag()),
582  _sys(ivar.sys(comp)),
583  _ivar(ivar.var(comp)),
584  _jvar(jvar),
585  _ife(systems[ivar.sys(comp)].getFETypeID(_ivar)),
586  _jfe(systems[ivar.sys(comp)].getFETypeID(_jvar)),
587  _n_idofs(assembly.getNumDofs(_elem.type, _ife)),
588  _n_jdofs(assembly.getNumDofs(_elem.type, _jfe))
589  {
590  }
600  KOKKOS_FUNCTION
602  const Assembly & assembly,
603  const Array<FESystem> & systems,
604  const Variable & ivar,
605  const unsigned int jvar,
606  const unsigned int comp = 0)
607  : Datum(node, assembly, systems),
608  _tag(ivar.tag()),
609  _sys(ivar.sys(comp)),
610  _ivar(ivar.var(comp)),
611  _jvar(jvar),
612  _ife(systems[ivar.sys(comp)].getFETypeID(_ivar)),
613  _jfe(systems[ivar.sys(comp)].getFETypeID(_jvar))
614  {
615  }
616 
621  KOKKOS_FUNCTION unsigned int n_dofs() const { return _n_idofs; }
626  KOKKOS_FUNCTION unsigned int n_idofs() const { return _n_idofs; }
631  KOKKOS_FUNCTION unsigned int n_jdofs() const { return _n_jdofs; }
636  KOKKOS_FUNCTION unsigned int sys() const { return _sys; }
641  KOKKOS_FUNCTION unsigned int var() const { return _ivar; }
646  KOKKOS_FUNCTION unsigned int ivar() const { return _ivar; }
651  KOKKOS_FUNCTION unsigned int jvar() const { return _jvar; }
656  KOKKOS_FUNCTION unsigned int fe() const { return _ife; }
661  KOKKOS_FUNCTION unsigned int ife() const { return _ife; }
666  KOKKOS_FUNCTION unsigned int jfe() const { return _jfe; }
671  KOKKOS_FUNCTION void do_derivatives(const bool flag) { _do_derivatives = flag; }
676  KOKKOS_FUNCTION bool do_derivatives() const { return _do_derivatives; }
677 
678 protected:
682  const TagID _tag;
686  const unsigned int _sys;
690  const unsigned int _ivar, _jvar;
694  const unsigned int _ife, _jfe;
698  const unsigned int _n_idofs = 1, _n_jdofs = 1;
702  bool _do_derivatives = true;
703 };
704 
705 } // namespace Moose::Kokkos
706 
unsigned int _local_thread_id
Thread ID for local parallelization.
Definition: KokkosDatum.h:441
const dof_id_type _elem_property_idx
Index for element-constant material properties.
Definition: KokkosDatum.h:415
The Kokkos array class.
Definition: KokkosArray.h:65
unsigned int _num_local_threads
Number of threads for local parallelization.
Definition: KokkosDatum.h:445
const unsigned int _sys
System number.
Definition: KokkosDatum.h:686
KOKKOS_FUNCTION Real getElementVolume(ContiguousElementID elem) const
Get the coordinate-weighted volume of a local element.
Definition: KokkosMesh.h:319
The Kokkos assembly class.
The Kokkos mesh object.
Definition: KokkosMesh.h:52
KOKKOS_FUNCTION dof_id_type extraElemID(unsigned int index) const
Get the extra element ID.
Definition: KokkosDatum.h:288
KOKKOS_FUNCTION unsigned int sys(unsigned int comp=0) const
Get the system number of a component.
KOKKOS_FUNCTION bool isSide() const
Get whether the current datum is on a side.
Definition: KokkosDatum.h:85
The Kokkos object that contains the information of an element The IDs used in Kokkos are different fr...
Definition: KokkosMesh.h:33
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object...
Definition: KokkosDatum.h:245
Moose::Kokkos::AssemblyDatum AssemblyDatum
Definition: KokkosDatum.h:708
KOKKOS_FUNCTION void set_local_parallel(const unsigned int local_thread_id, const unsigned int num_local_threads)
Set local parallelization option.
Definition: KokkosDatum.h:369
KOKKOS_FUNCTION bool do_derivatives() const
Get whether to compute derivatives for automatic differentiation (AD)
Definition: KokkosDatum.h:676
KOKKOS_FUNCTION Real3 getElementCentroid(ContiguousElementID elem) const
Get the centroid of a local element.
Definition: KokkosMesh.h:330
const unsigned int invalid_uint
const unsigned int _n_jdofs
Definition: KokkosDatum.h:698
const Assembly & _assembly
Reference of the Kokkos assembly.
Definition: KokkosDatum.h:390
unsigned int TagID
Definition: MooseTypes.h:238
KOKKOS_INLINE_FUNCTION void identity(const unsigned int dim=3)
Definition: KokkosTypes.h:387
dof_id_type ContiguousElementID
Definition: KokkosMesh.h:20
KOKKOS_FUNCTION Real3 normals(const unsigned int qp)
Get the normal vector on surface.
Definition: KokkosDatum.h:528
KOKKOS_FUNCTION ContiguousSubdomainID subdomain() const
Get the contiguous subdomain ID.
Definition: KokkosDatum.h:91
const unsigned int _jvar
Definition: KokkosDatum.h:690
KOKKOS_FUNCTION unsigned int num_local_threads() const
Get the number of local threads.
Definition: KokkosDatum.h:384
KOKKOS_FUNCTION ContiguousElementID elemID() const
Get the contiguous element ID.
Definition: KokkosDatum.h:52
Moose::Kokkos::Datum Datum
Definition: KokkosDatum.h:707
KOKKOS_FUNCTION unsigned int getDimension() const
Get the mesh dimension.
KOKKOS_FUNCTION void do_derivatives(const bool flag)
Set whether to compute derivatives for automatic differentiation (AD)
Definition: KokkosDatum.h:671
KOKKOS_FUNCTION Real3 getSideNormal(ContiguousElementID elem, unsigned int side) const
Get the outward unit normal of an element side.
Definition: KokkosMesh.h:250
MeshBase & mesh
KOKKOS_FUNCTION bool isNodalDefined(const Variable &var) const
Get whether the a variable is defined on the current node.
Definition: KokkosDatum.h:486
KOKKOS_FUNCTION unsigned int sys() const
Get the system number of variable.
Definition: KokkosDatum.h:636
KOKKOS_FUNCTION const FESystem & system(unsigned int sys) const
Get the Kokkos system.
Definition: KokkosDatum.h:281
KOKKOS_FUNCTION unsigned int jvar() const
Get the coupled variable number.
Definition: KokkosDatum.h:651
KOKKOS_FUNCTION const Real33 & J(const unsigned int qp)
Get the inverse of Jacobian matrix | dxi/dx deta/dx dzeta/dx | | dxi/dy deta/dy dzeta/dy | | dxi/dz d...
Definition: KokkosDatum.h:495
static KOKKOS_FUNCTION ElementInfo neighborInfo(ContiguousElementID elem, const unsigned int side, const Mesh &mesh)
Get the neighbor element information object for an element side.
Definition: KokkosDatum.h:155
KOKKOS_FUNCTION Real3 q_point(const unsigned int qp)
Get the physical quadrature point coordinate.
Definition: KokkosDatum.h:517
const unsigned int _n_qps
Number of local quadrature points.
Definition: KokkosDatum.h:405
KOKKOS_FUNCTION Real3 faceNormal() const
Get the outward unit normal of the current element side.
Definition: KokkosDatum.h:191
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
KOKKOS_FUNCTION unsigned int n_jdofs() const
Get the number of local DOFs for the coupled variable.
Definition: KokkosDatum.h:631
const ElementInfo _neighbor
Current neighbor element information object.
Definition: KokkosDatum.h:135
const Array< FESystem > & _systems
Reference of the Kokkos systems.
Definition: KokkosDatum.h:395
KOKKOS_FUNCTION unsigned int ivar() const
Get the variable number.
Definition: KokkosDatum.h:646
KOKKOS_FUNCTION bool hasNeighbor() const
Get whether the current side has a neighbor.
Definition: KokkosDatum.h:149
KOKKOS_FUNCTION Datum(const ContiguousElementID elem, const unsigned int side, const Assembly &assembly, const Array< FESystem > &systems)
Constructor for element and side data.
Definition: KokkosDatum.h:448
KOKKOS_FUNCTION unsigned int side() const
Get the side index.
Definition: KokkosDatum.h:79
KOKKOS_FUNCTION unsigned int fe() const
Get the variable FE type ID.
Definition: KokkosDatum.h:656
const unsigned int _jfe
Definition: KokkosDatum.h:694
KOKKOS_FUNCTION unsigned int jfe() const
Get the coupled variable FE type ID.
Definition: KokkosDatum.h:666
PropertyConstantOption
Property constant options.
static constexpr dof_id_type invalid_id
dof_id_type ContiguousNodeID
Definition: KokkosMesh.h:21
KOKKOS_FUNCTION unsigned int n_idofs() const
Get the number of local DOFs.
Definition: KokkosDatum.h:626
const unsigned int _n_idofs
Number of local DOFs.
Definition: KokkosDatum.h:698
KOKKOS_FUNCTION unsigned int n_qps() const
Get the number of local quadrature points.
Definition: KokkosDatum.h:303
KOKKOS_FUNCTION Real getElementCentroidToSideCentroidDistance(ContiguousElementID elem, unsigned int side) const
Get the element-centroid to side-centroid distance for an element side.
Definition: KokkosMesh.h:273
KOKKOS_FUNCTION Real faceDCNMag() const
Get the distance from the current element centroid to its neighbor centroid.
Definition: KokkosDatum.h:198
KOKKOS_FUNCTION ContiguousElementID getNeighbor(ContiguousElementID elem, unsigned int side) const
Get the neighbor contiguous element ID.
Definition: KokkosMesh.h:218
KOKKOS_FUNCTION unsigned int local_thread_id() const
Get the current local thread ID.
Definition: KokkosDatum.h:379
const unsigned int _side
Current side index.
Definition: KokkosDatum.h:130
The Kokkos FE system class.
KOKKOS_FUNCTION const Assembly & assembly() const
Get the Kokkos assembly.
Definition: KokkosDatum.h:274
Moose::Kokkos::FVDatum FVDatum
Definition: KokkosDatum.h:709
const TagID _tag
Solution tag ID.
Definition: KokkosDatum.h:682
KOKKOS_FUNCTION const auto & getElementInfo(ContiguousElementID elem) const
Get the element information object.
Definition: KokkosMesh.h:206
KOKKOS_FUNCTION dof_id_type getExtraElementID(ContiguousElementID elem, unsigned int index) const
Get the extra element ID of an element.
Definition: KokkosMesh.h:383
KOKKOS_FUNCTION Real3 getSideCentroid(ContiguousElementID elem, unsigned int side) const
Get the centroid of an element side.
Definition: KokkosMesh.h:239
KOKKOS_FUNCTION bool nodal() const
Get whether the variable is nodal.
KOKKOS_FUNCTION void reinitTransform(const unsigned int qp)
Compute and cache the physical transformation data.
Definition: KokkosDatum.h:539
KOKKOS_FUNCTION Real3 elementCentroid() const
Get the current element centroid.
Definition: KokkosDatum.h:225
KOKKOS_FUNCTION unsigned int var() const
Get the variable number.
Definition: KokkosDatum.h:641
KOKKOS_FUNCTION Real3 getNodePoint(ContiguousNodeID node) const
Get the coordinate of a node.
Definition: KokkosMesh.h:428
KOKKOS_FUNCTION Real getJxW(ElementInfo info, unsigned int qp) const
Get the transformed Jacobian weight of an element quadrature point.
bool _do_derivatives
Whether to compute derivatives for automatic differentiation (AD)
Definition: KokkosDatum.h:702
KOKKOS_FUNCTION const Mesh & kokkosMesh() const
Get the const reference of the Kokkos mesh.
Definition: KokkosMesh.h:651
KOKKOS_FUNCTION Real faceDCFMag() const
Get the distance from the current element centroid to the current side centroid.
Definition: KokkosDatum.h:208
ContiguousSubdomainID subdomain
Contiguous subdomain ID.
Definition: KokkosMesh.h:46
KOKKOS_FUNCTION ContiguousNodeID node() const
Get the contiguous node ID.
Definition: KokkosDatum.h:297
KOKKOS_FUNCTION FVDatum(ContiguousElementID elem, const unsigned int side, const Mesh &mesh)
Constructor.
Definition: KokkosDatum.h:235
KOKKOS_FUNCTION AssemblyDatum(const ContiguousNodeID node, const Assembly &assembly, const Array< FESystem > &systems, const Variable &ivar, const unsigned int jvar, const unsigned int comp=0)
Constructor for node data.
Definition: KokkosDatum.h:601
KOKKOS_FUNCTION dof_id_type propertyIdx(const PropertyConstantOption constant_option, const unsigned int qp) const
Get the index into the property data storage.
Definition: KokkosDatum.h:473
KOKKOS_FUNCTION Real getSideArea(ContiguousElementID elem, unsigned int side) const
Get the coordinate-weighted area of an element side.
Definition: KokkosMesh.h:228
const dof_id_type _qp_offset
Starting offset into the global quadrature point index.
Definition: KokkosDatum.h:410
KOKKOS_FUNCTION ContiguousSubdomainID neighborSubdomain() const
Get the contiguous neighbor subdomain ID.
Definition: KokkosDatum.h:97
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION bool isNodal() const
Get whether the current datum is on a node.
Definition: KokkosDatum.h:324
The Kokkos variable object that carries the coupled variable and tag information. ...
KOKKOS_FUNCTION AssemblyDatum(const ContiguousElementID elem, const unsigned int side, const Assembly &assembly, const Array< FESystem > &systems, const Variable &ivar, const unsigned int jvar, const unsigned int comp=0)
Constructor for element and side data.
Definition: KokkosDatum.h:573
KOKKOS_FUNCTION unsigned int ife() const
Get the variable FE type ID.
Definition: KokkosDatum.h:661
const ElementInfo _elem
Current element information object.
Definition: KokkosDatum.h:125
The Kokkos object that holds thread-private data in the parallel operations of Kokkos kernels...
Definition: KokkosDatum.h:559
KOKKOS_FUNCTION Real JxW(const unsigned int qp)
Get the transformed Jacobian weight.
Definition: KokkosDatum.h:506
Device-side geometric context for finite volume kernels and boundary conditions.
Definition: KokkosDatum.h:167
unsigned int _cached_qp
Cached quadrature point index for checking whether the physical transformation data should be recompu...
Definition: KokkosDatum.h:428
KOKKOS_FUNCTION const ElementInfo & elem() const
Get the element information object.
Definition: KokkosDatum.h:46
KOKKOS_FUNCTION unsigned int var(unsigned int comp=0) const
Get the variable number of a component.
KOKKOS_FUNCTION const Mesh & mesh() const
Get the Kokkos mesh.
Definition: KokkosDatum.h:40
Generic datum class containing geometric information related to the mesh.
Definition: KokkosDatum.h:24
KOKKOS_FUNCTION unsigned int n_dofs() const
Get the number of local DOFs.
Definition: KokkosDatum.h:621
KOKKOS_FUNCTION Real getElementCentroidToNeighborCentroidDistance(ContiguousElementID elem, unsigned int side) const
Get the element-centroid to neighbor-centroid distance for an element side with a neighbor...
Definition: KokkosMesh.h:299
KOKKOS_FUNCTION const ElementInfo & neighbor() const
Get the neighbor element information object.
Definition: KokkosDatum.h:67
KOKKOS_FUNCTION dof_id_type qpOffset() const
Get the starting offset into the global quadrature point index.
Definition: KokkosDatum.h:309
KOKKOS_FUNCTION Real faceArea() const
Get the coordinate-weighted area of the current element side.
Definition: KokkosDatum.h:218
KOKKOS_FUNCTION Real elementVolume() const
Get the coordinate-weighted current element volume.
Definition: KokkosDatum.h:232
const Mesh & _mesh
Reference to the Kokkos mesh.
Definition: KokkosDatum.h:120
const ContiguousNodeID _node
Current contiguous node ID.
Definition: KokkosDatum.h:400
const unsigned int _ivar
Variable numbers.
Definition: KokkosDatum.h:690
ContiguousElementID id
Contiguous element ID.
Definition: KokkosMesh.h:42
KOKKOS_FUNCTION Real33 getJacobian(ElementInfo info, unsigned int qp) const
Get the inverse of Jacobian matrix of an element quadrature point.
const unsigned int _ife
FE type IDs of variables.
Definition: KokkosDatum.h:694
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)
KOKKOS_FUNCTION Real3 faceCentroid() const
Get the centroid of the current element side.
Definition: KokkosDatum.h:184
uint8_t dof_id_type
KOKKOS_FUNCTION ContiguousElementID neighborID() const
Get the contiguous neighbor element ID.
Definition: KokkosDatum.h:73
Real33 _J
Cached physical transformation data.
Definition: KokkosDatum.h:433
KOKKOS_FUNCTION void computePhysicalMap(const ElementInfo info, const unsigned int qp, Real33 *const jacobian, Real *const JxW, Real3 *const q_points) const
Compute physical transformation data for an element.
KOKKOS_FUNCTION Real3 getQPoint(ElementInfo info, unsigned int qp) const
Get the coordinate of an element quadrature point.
KOKKOS_FUNCTION MeshDatum(ContiguousElementID elem, const unsigned int side, const Mesh &mesh)
Constructor.
Definition: KokkosDatum.h:138