https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Moose::Kokkos::Datum Class Reference

The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object. More...

#include <KokkosDatum.h>

Inheritance diagram for Moose::Kokkos::Datum:
[legend]

Public Member Functions

KOKKOS_FUNCTION Datum (const ContiguousElementID elem, const unsigned int side, const Assembly &assembly, const Array< FESystem > &systems)
 Constructor for element and side data.
 
KOKKOS_FUNCTION Datum (const ContiguousNodeID node, const Assembly &assembly, const Array< FESystem > &systems)
 Constructor for node data.
 
KOKKOS_FUNCTION const Assemblyassembly () const
 Get the Kokkos assembly.
 
KOKKOS_FUNCTION const FESystemsystem (unsigned int sys) const
 Get the Kokkos system.
 
KOKKOS_FUNCTION dof_id_type extraElemID (unsigned int index) const
 Get the extra element ID.
 
KOKKOS_FUNCTION ContiguousNodeID node () const
 Get the contiguous node ID.
 
KOKKOS_FUNCTION unsigned int n_qps () const
 Get the number of local quadrature points.
 
KOKKOS_FUNCTION dof_id_type qpOffset () const
 Get the starting offset into the global quadrature point index.
 
KOKKOS_FUNCTION dof_id_type propertyIdx (const PropertyConstantOption constant_option, const unsigned int qp) const
 Get the index into the property data storage.
 
KOKKOS_FUNCTION bool isNodal () const
 Get whether the current datum is on a node.
 
KOKKOS_FUNCTION bool isNodalDefined (const Variable &var) const
 Get whether the a variable is defined on the current node.
 
KOKKOS_FUNCTION const Real33J (const unsigned int qp)
 Get the inverse of Jacobian matrix | dxi/dx deta/dx dzeta/dx | | dxi/dy deta/dy dzeta/dy | | dxi/dz deta/dz dzeta/dz |.
 
KOKKOS_FUNCTION Real JxW (const unsigned int qp)
 Get the transformed Jacobian weight.
 
KOKKOS_FUNCTION Real3 q_point (const unsigned int qp)
 Get the physical quadrature point coordinate.
 
KOKKOS_FUNCTION Real3 normals (const unsigned int qp)
 Get the normal vector on surface.
 
KOKKOS_FUNCTION void set_local_parallel (const unsigned int local_thread_id, const unsigned int num_local_threads)
 Set local parallelization option.
 
KOKKOS_FUNCTION unsigned int local_thread_id () const
 Get the current local thread ID.
 
KOKKOS_FUNCTION unsigned int num_local_threads () const
 Get the number of local threads.
 
KOKKOS_FUNCTION const Meshmesh () const
 Get the Kokkos mesh.
 
KOKKOS_FUNCTION const ElementInfoelem () const
 Get the element information object.
 
KOKKOS_FUNCTION ContiguousElementID elemID () const
 Get the contiguous element ID.
 
KOKKOS_FUNCTION bool hasNeighbor () const
 Get whether the current side has a neighbor.
 
KOKKOS_FUNCTION const ElementInfoneighbor () const
 Get the neighbor element information object.
 
KOKKOS_FUNCTION ContiguousElementID neighborID () const
 Get the contiguous neighbor element ID.
 
KOKKOS_FUNCTION unsigned int side () const
 Get the side index.
 
KOKKOS_FUNCTION bool isSide () const
 Get whether the current datum is on a side.
 
KOKKOS_FUNCTION ContiguousSubdomainID subdomain () const
 Get the contiguous subdomain ID.
 
KOKKOS_FUNCTION ContiguousSubdomainID neighborSubdomain () const
 Get the contiguous neighbor subdomain ID.
 

Static Protected Member Functions

static KOKKOS_FUNCTION ElementInfo neighborInfo (ContiguousElementID elem, const unsigned int side, const Mesh &mesh)
 Get the neighbor element information object for an element side.
 

Protected Attributes

const Assembly_assembly
 Reference of the Kokkos assembly.
 
const Array< FESystem > & _systems
 Reference of the Kokkos systems.
 
const ContiguousNodeID _node = libMesh::DofObject::invalid_id
 Current contiguous node ID.
 
const unsigned int _n_qps = 1
 Number of local quadrature points.
 
const dof_id_type _qp_offset = libMesh::DofObject::invalid_id
 Starting offset into the global quadrature point index.
 
const dof_id_type _elem_property_idx = libMesh::DofObject::invalid_id
 Index for element-constant material properties.
 
const Mesh_mesh
 Reference to the Kokkos mesh.
 
const ElementInfo _elem
 Current element information object.
 
const unsigned int _side = libMesh::invalid_uint
 Current side index.
 
const ElementInfo _neighbor
 Current neighbor element information object.
 

Private Member Functions

KOKKOS_FUNCTION void reinitTransform (const unsigned int qp)
 Compute and cache the physical transformation data.
 

Private Attributes

unsigned int _cached_qp = libMesh::invalid_uint
 Cached quadrature point index for checking whether the physical transformation data should be recomputed.
 
unsigned int _local_thread_id = 0
 Thread ID for local parallelization.
 
unsigned int _num_local_threads = 1
 Number of threads for local parallelization.
 
Real33 _J
 Cached physical transformation data.
 
Real _JxW
 
Real3 _xyz
 
Real3 _normal
 

Detailed Description

The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object.

Definition at line 245 of file KokkosDatum.h.

Constructor & Destructor Documentation

◆ Datum() [1/2]

KOKKOS_FUNCTION Moose::Kokkos::Datum::Datum ( const ContiguousElementID  elem,
const unsigned int  side,
const Assembly assembly,
const Array< FESystem > &  systems 
)
inline

Constructor for element and side data.

Parameters
elemThe contiguous element ID of the current thread
sideThe side index of the current thread
assemblyThe Kokkos assembly
systemsThe Kokkos systems

Definition at line 448 of file KokkosDatum.h.

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}
KOKKOS_FUNCTION dof_id_type getNumQps(ContiguousSubdomainID subdomain) const
Get the total number of elemental quadrature points in a subdomain.
const Assembly & _assembly
Reference of the Kokkos assembly.
const dof_id_type _elem_property_idx
Index for element-constant material properties.
const Array< FESystem > & _systems
Reference of the Kokkos systems.
const dof_id_type _qp_offset
Starting offset into the global quadrature point index.
KOKKOS_FUNCTION const Assembly & assembly() const
Get the Kokkos assembly.
const unsigned int _n_qps
Number of local quadrature points.
KOKKOS_FUNCTION bool isSide() const
Get whether the current datum is on a side.
Definition KokkosDatum.h:85
KOKKOS_FUNCTION unsigned int side() const
Get the side index.
Definition KokkosDatum.h:79
KOKKOS_FUNCTION const ElementInfo & elem() const
Get the element information object.
Definition KokkosDatum.h:46
const Mesh & _mesh
Reference to the Kokkos mesh.
const unsigned int _side
Current side index.
KOKKOS_FUNCTION ContiguousSubdomainID subdomain() const
Get the contiguous subdomain ID.
Definition KokkosDatum.h:91
const ElementInfo _elem
Current element information object.
KOKKOS_FUNCTION MeshDatum(ContiguousElementID elem, const unsigned int side, const Mesh &mesh)
Constructor.
KOKKOS_FUNCTION const Mesh & kokkosMesh() const
Get the const reference of the Kokkos mesh.
Definition KokkosMesh.h:651

◆ Datum() [2/2]

KOKKOS_FUNCTION Moose::Kokkos::Datum::Datum ( const ContiguousNodeID  node,
const Assembly assembly,
const Array< FESystem > &  systems 
)
inline

Constructor for node data.

Parameters
nodeThe contiguous node ID of the current thread
assemblyThe Kokkos assembly
systemsThe Kokkos systems

Definition at line 462 of file KokkosDatum.h.

467 _systems(systems),
468 _node(node)
469{
470}
const ContiguousNodeID _node
Current contiguous node ID.
KOKKOS_FUNCTION ContiguousNodeID node() const
Get the contiguous node ID.
static constexpr dof_id_type invalid_id
const unsigned int invalid_uint

Member Function Documentation

◆ assembly()

KOKKOS_FUNCTION const Assembly & Moose::Kokkos::Datum::assembly ( ) const
inline

◆ elem()

KOKKOS_FUNCTION const ElementInfo & Moose::Kokkos::MeshDatum::elem ( ) const
inlineinherited

◆ elemID()

KOKKOS_FUNCTION ContiguousElementID Moose::Kokkos::MeshDatum::elemID ( ) const
inlineinherited

Get the contiguous element ID.

Returns
The contiguous element ID

Definition at line 52 of file KokkosDatum.h.

52{ return _elem.id; }
ContiguousElementID id
Contiguous element ID.
Definition KokkosMesh.h:42

Referenced by KokkosExtraIDIntegralVectorPostprocessor::execute(), Moose::Kokkos::LinearFVFluxKernel::hasBoundaryData(), and KokkosExtraIDIntegralVectorPostprocessor::reduce().

◆ extraElemID()

KOKKOS_FUNCTION dof_id_type Moose::Kokkos::Datum::extraElemID ( unsigned int  index) const
inline

Get the extra element ID.

Parameters
indexThe extra element ID index
Returns
The extra element ID

Definition at line 288 of file KokkosDatum.h.

289 {
291 }
KOKKOS_FUNCTION bool isNodal() const
Get whether the current datum is on a node.
KOKKOS_FUNCTION dof_id_type getExtraElementID(ContiguousElementID elem, unsigned int index) const
Get the extra element ID of an element.
Definition KokkosMesh.h:383

Referenced by KokkosExtraElementIDAux::computeValue().

◆ hasNeighbor()

KOKKOS_FUNCTION bool Moose::Kokkos::MeshDatum::hasNeighbor ( ) const
inlineinherited

Get whether the current side has a neighbor.

Returns
Whether the current side has a neighbor

Definition at line 149 of file KokkosDatum.h.

150{
152}
const ElementInfo _neighbor
Current neighbor element information object.

Referenced by Moose::Kokkos::LinearFVFluxKernel::hasFaceNeighbor().

◆ isNodal()

KOKKOS_FUNCTION bool Moose::Kokkos::Datum::isNodal ( ) const
inline

◆ isNodalDefined()

KOKKOS_FUNCTION bool Moose::Kokkos::Datum::isNodalDefined ( const Variable var) const
inline

Get whether the a variable is defined on the current node.

Parameters
varThe variable
Returns
Whether the variable is defined on the current node

Definition at line 486 of file KokkosDatum.h.

487{
488 if (!isNodal() || !var.nodal())
489 return false;
490
491 return _systems[var.sys()].isNodalDefined(_node, var.var());
492}

Referenced by KokkosNodalExtremeValue::reduce(), KokkosNodalMaxValueId::reduce(), and KokkosNodalSum::reduce().

◆ isSide()

KOKKOS_FUNCTION bool Moose::Kokkos::MeshDatum::isSide ( ) const
inlineinherited

Get whether the current datum is on a side.

Returns
Whether the current datum is on a side

Definition at line 85 of file KokkosDatum.h.

85{ return _side != libMesh::invalid_uint; }

Referenced by normals(), and reinitTransform().

◆ J()

KOKKOS_FUNCTION const Real33 & Moose::Kokkos::Datum::J ( const unsigned int  qp)
inline

Get the inverse of Jacobian matrix | dxi/dx deta/dx dzeta/dx | | dxi/dy deta/dy dzeta/dy | | dxi/dz deta/dz dzeta/dz |.

Parameters
qpThe local quadrature point index
Returns
The Jacobian matrix

Definition at line 495 of file KokkosDatum.h.

496{
497 if (!isNodal())
498 reinitTransform(qp);
499 else
501
502 return _J;
503}
KOKKOS_FUNCTION unsigned int getDimension() const
Get the mesh dimension.
Real33 _J
Cached physical transformation data.
KOKKOS_FUNCTION void reinitTransform(const unsigned int qp)
Compute and cache the physical transformation data.
KOKKOS_INLINE_FUNCTION void identity(const unsigned int dim=3)

Referenced by Moose::Kokkos::KernelGrad::computeJacobianInternal(), Moose::Kokkos::VectorKernelGrad::computeJacobianInternal(), Moose::Kokkos::KernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorKernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::KernelGrad::computeResidualInternal(), Moose::Kokkos::VectorKernelGrad::computeResidualInternal(), Moose::Kokkos::VariableGradientTempl< is_ad >::get(), Moose::Kokkos::VariableShapeGradient< is_test >::operator()(), Moose::Kokkos::VectorVariableShapeGradient< is_test >::operator()(), Moose::Kokkos::VectorVariableShapeCurl< is_test >::operator()(), Moose::Kokkos::VectorVariableGradient::operator()(), and Moose::Kokkos::VectorVariableCurl::operator()().

◆ JxW()

KOKKOS_FUNCTION Real Moose::Kokkos::Datum::JxW ( const unsigned int  qp)
inline

Get the transformed Jacobian weight.

Parameters
qpThe local quadrature point index
Returns
The transformed Jacobian weights

Definition at line 506 of file KokkosDatum.h.

507{
508 if (!isNodal())
509 reinitTransform(qp);
510 else
511 _JxW = 1;
512
513 return _JxW;
514}

Referenced by Moose::Kokkos::AuxKernel::computeElementInternal(), Moose::Kokkos::IntegratedBC::computeJacobianInternal(), Moose::Kokkos::IntegratedBCValue::computeJacobianInternal(), Moose::Kokkos::VectorIntegratedBC::computeJacobianInternal(), Moose::Kokkos::VectorIntegratedBCValue::computeJacobianInternal(), Moose::Kokkos::Kernel::computeJacobianInternal(), Moose::Kokkos::KernelGrad::computeJacobianInternal(), Moose::Kokkos::KernelValue::computeJacobianInternal(), KokkosTimeDerivative::computeJacobianInternal(), Moose::Kokkos::VectorKernel::computeJacobianInternal(), Moose::Kokkos::VectorKernelGrad::computeJacobianInternal(), Moose::Kokkos::VectorKernelValue::computeJacobianInternal(), KokkosVectorTimeDerivative::computeJacobianInternal(), Moose::Kokkos::IntegratedBC::computeOffDiagJacobianInternal(), Moose::Kokkos::IntegratedBCValue::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorIntegratedBC::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorIntegratedBCValue::computeOffDiagJacobianInternal(), Moose::Kokkos::Kernel::computeOffDiagJacobianInternal(), Moose::Kokkos::KernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::KernelValue::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorKernel::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorKernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorKernelValue::computeOffDiagJacobianInternal(), Moose::Kokkos::ADIntegratedBC::computeResidualInternal(), Moose::Kokkos::IntegratedBC::computeResidualInternal(), Moose::Kokkos::IntegratedBCValue::computeResidualInternal(), Moose::Kokkos::VectorIntegratedBC::computeResidualInternal(), Moose::Kokkos::VectorIntegratedBCValue::computeResidualInternal(), Moose::Kokkos::ADKernel::computeResidualInternal(), Moose::Kokkos::Kernel::computeResidualInternal(), Moose::Kokkos::KernelGrad::computeResidualInternal(), Moose::Kokkos::KernelValue::computeResidualInternal(), Moose::Kokkos::TimeKernel::computeResidualInternal(), Moose::Kokkos::VectorKernel::computeResidualInternal(), Moose::Kokkos::VectorKernelGrad::computeResidualInternal(), Moose::Kokkos::VectorKernelValue::computeResidualInternal(), KokkosElementVariableStatistics::computeValue(), KokkosExtraIDIntegralVectorPostprocessor::execute(), KokkosIntegralPostprocessor< Base >::reduce(), and KokkosExtraIDIntegralVectorPostprocessor::reduce().

◆ local_thread_id()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::Datum::local_thread_id ( ) const
inline

◆ mesh()

KOKKOS_FUNCTION const Mesh & Moose::Kokkos::MeshDatum::mesh ( ) const
inlineinherited

Get the Kokkos mesh.

Returns
The Kokkos mesh

Definition at line 40 of file KokkosDatum.h.

40{ return _mesh; }

Referenced by Moose::Kokkos::MeshDatum::neighborInfo().

◆ n_qps()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::Datum::n_qps ( ) const
inline

Get the number of local quadrature points.

Returns
The number of local quadrature points

Definition at line 303 of file KokkosDatum.h.

303{ return _n_qps; }

Referenced by Moose::Kokkos::AuxKernel::computeElementInternal(), Moose::Kokkos::IntegratedBC::computeJacobianInternal(), Moose::Kokkos::IntegratedBCValue::computeJacobianInternal(), Moose::Kokkos::VectorIntegratedBC::computeJacobianInternal(), Moose::Kokkos::VectorIntegratedBCValue::computeJacobianInternal(), Moose::Kokkos::Kernel::computeJacobianInternal(), Moose::Kokkos::KernelGrad::computeJacobianInternal(), Moose::Kokkos::KernelValue::computeJacobianInternal(), KokkosTimeDerivative::computeJacobianInternal(), Moose::Kokkos::VectorKernel::computeJacobianInternal(), Moose::Kokkos::VectorKernelGrad::computeJacobianInternal(), Moose::Kokkos::VectorKernelValue::computeJacobianInternal(), KokkosVectorTimeDerivative::computeJacobianInternal(), Moose::Kokkos::IntegratedBC::computeOffDiagJacobianInternal(), Moose::Kokkos::IntegratedBCValue::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorIntegratedBC::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorIntegratedBCValue::computeOffDiagJacobianInternal(), Moose::Kokkos::Kernel::computeOffDiagJacobianInternal(), Moose::Kokkos::KernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::KernelValue::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorKernel::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorKernelGrad::computeOffDiagJacobianInternal(), Moose::Kokkos::VectorKernelValue::computeOffDiagJacobianInternal(), Moose::Kokkos::ADIntegratedBC::computeResidualInternal(), Moose::Kokkos::IntegratedBC::computeResidualInternal(), Moose::Kokkos::IntegratedBCValue::computeResidualInternal(), Moose::Kokkos::VectorIntegratedBC::computeResidualInternal(), Moose::Kokkos::VectorIntegratedBCValue::computeResidualInternal(), Moose::Kokkos::ADKernel::computeResidualInternal(), Moose::Kokkos::Kernel::computeResidualInternal(), Moose::Kokkos::KernelGrad::computeResidualInternal(), Moose::Kokkos::KernelValue::computeResidualInternal(), Moose::Kokkos::TimeKernel::computeResidualInternal(), Moose::Kokkos::VectorKernel::computeResidualInternal(), Moose::Kokkos::VectorKernelGrad::computeResidualInternal(), Moose::Kokkos::VectorKernelValue::computeResidualInternal(), KokkosElementVariableStatistics::computeValue(), KokkosExtraIDIntegralVectorPostprocessor::execute(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::Material::operator()(), KokkosElementExtremeValue::reduce(), KokkosIntegralPostprocessor< Base >::reduce(), KokkosSideExtremeValue::reduce(), and KokkosExtraIDIntegralVectorPostprocessor::reduce().

◆ neighbor()

KOKKOS_FUNCTION const ElementInfo & Moose::Kokkos::MeshDatum::neighbor ( ) const
inlineinherited

Get the neighbor element information object.

Returns
The neighbor element information object. If there is no neighbor or if this datum is not meant to represent face data, then this will point to a default constructed ElementInfo whose data members represent invalid state (e.g. hold invalid_uint, invalid_id like values)

Definition at line 67 of file KokkosDatum.h.

67{ return _neighbor; }

Referenced by Moose::Kokkos::MeshDatum::neighborInfo().

◆ neighborID()

KOKKOS_FUNCTION ContiguousElementID Moose::Kokkos::MeshDatum::neighborID ( ) const
inlineinherited

Get the contiguous neighbor element ID.

Returns
The contiguous neighbor element ID or libMesh::DofObject::invalid_id

Definition at line 73 of file KokkosDatum.h.

73{ return _neighbor.id; }

Referenced by Moose::Kokkos::LinearFVFluxKernel::operator()().

◆ neighborInfo()

KOKKOS_FUNCTION ElementInfo Moose::Kokkos::MeshDatum::neighborInfo ( ContiguousElementID  elem,
const unsigned int  side,
const Mesh mesh 
)
inlinestaticprotectedinherited

Get the neighbor element information object for an element side.

Parameters
elemThe contiguous element ID
sideThe side index
meshThe Kokkos mesh
Returns
The neighbor element information object, or a default ElementInfo (a default constructed ElementInfo's data members all represent invalid state) when elem is libMesh::DofObject::invalid_id, side is libMesh::invalid_uint, or the Kokkos mesh has no contiguous neighbor ID for the side. The latter includes exterior boundary sides with no libMesh neighbor and sides whose libMesh neighbor is libMesh::remote_elem. Off-process neighbors present as ghost elements have contiguous IDs and return their ElementInfo.

Definition at line 155 of file KokkosDatum.h.

156{
158 return {};
159
160 const auto neighbor = mesh.getNeighbor(elem, side);
162}
KOKKOS_FUNCTION const ElementInfo & neighbor() const
Get the neighbor element information object.
Definition KokkosDatum.h:67
KOKKOS_FUNCTION const Mesh & mesh() const
Get the Kokkos mesh.
Definition KokkosDatum.h:40
KOKKOS_FUNCTION const auto & getElementInfo(ContiguousElementID elem) const
Get the element information object.
Definition KokkosMesh.h:206
KOKKOS_FUNCTION ContiguousElementID getNeighbor(ContiguousElementID elem, unsigned int side) const
Get the neighbor contiguous element ID.
Definition KokkosMesh.h:218

◆ neighborSubdomain()

KOKKOS_FUNCTION ContiguousSubdomainID Moose::Kokkos::MeshDatum::neighborSubdomain ( ) const
inlineinherited

Get the contiguous neighbor subdomain ID.

Returns
The contiguous neighbor subdomain ID

Definition at line 97 of file KokkosDatum.h.

97{ return _neighbor.subdomain; }
ContiguousSubdomainID subdomain
Contiguous subdomain ID.
Definition KokkosMesh.h:46

Referenced by Moose::Kokkos::LinearFVFluxKernel::hasFaceNeighbor().

◆ node()

KOKKOS_FUNCTION ContiguousNodeID Moose::Kokkos::Datum::node ( ) const
inline

◆ normals()

KOKKOS_FUNCTION Real3 Moose::Kokkos::Datum::normals ( const unsigned int  qp)
inline

Get the normal vector on surface.

Parameters
qpThe local quadrature point index
Returns
The normal vector

Definition at line 528 of file KokkosDatum.h.

529{
530 KOKKOS_ASSERT(isSide());
531
532 if (isSide())
533 reinitTransform(qp);
534
535 return _normal;
536}

Referenced by KokkosDirectionalNeumannBC::precomputeQpResidual().

◆ num_local_threads()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::Datum::num_local_threads ( ) const
inline

◆ propertyIdx()

KOKKOS_FUNCTION dof_id_type Moose::Kokkos::Datum::propertyIdx ( const PropertyConstantOption  constant_option,
const unsigned int  qp 
) const
inline

Get the index into the property data storage.

Parameters
constant_optionThe property constant option
qpThe local quadrature point index
Returns
The index

Definition at line 473 of file KokkosDatum.h.

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}
unsigned int idx(const ElemType type, const unsigned int nx, const unsigned int i, const unsigned int j)
uint8_t dof_id_type

◆ q_point()

KOKKOS_FUNCTION Real3 Moose::Kokkos::Datum::q_point ( const unsigned int  qp)
inline

Get the physical quadrature point coordinate.

Parameters
qpThe local quadrature point index
Returns
The physical quadrature point coordinate

Definition at line 517 of file KokkosDatum.h.

518{
519 if (!isNodal())
520 reinitTransform(qp);
521 else
523
524 return _xyz;
525}
KOKKOS_FUNCTION Real3 getNodePoint(ContiguousNodeID node) const
Get the coordinate of a node.
Definition KokkosMesh.h:428

Referenced by KokkosParsedMaterial::computeQpProperties(), KokkosFunctionAux::computeValue(), and KokkosParsedAux::computeValue().

◆ qpOffset()

KOKKOS_FUNCTION dof_id_type Moose::Kokkos::Datum::qpOffset ( ) const
inline

◆ reinitTransform()

KOKKOS_FUNCTION void Moose::Kokkos::Datum::reinitTransform ( const unsigned int  qp)
inlineprivate

Compute and cache the physical transformation data.

Parameters
qpThe local quadrature point index

Definition at line 539 of file KokkosDatum.h.

540{
541 if (_cached_qp == qp)
542 return;
543
544 if (!isSide())
545 {
547 _JxW = _assembly.getJxW(_elem, qp);
549 }
550 else
552
553 _cached_qp = qp;
554}
KOKKOS_FUNCTION Real getJxW(ElementInfo info, unsigned int qp) const
Get the transformed Jacobian weight of an element quadrature point.
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 Real33 getJacobian(ElementInfo info, unsigned int qp) const
Get the inverse of Jacobian matrix of an element quadrature point.
KOKKOS_FUNCTION Real3 getQPoint(ElementInfo info, unsigned int qp) const
Get the coordinate of an element quadrature point.
unsigned int _cached_qp
Cached quadrature point index for checking whether the physical transformation data should be recompu...

Referenced by J(), JxW(), normals(), and q_point().

◆ set_local_parallel()

KOKKOS_FUNCTION void Moose::Kokkos::Datum::set_local_parallel ( const unsigned int  local_thread_id,
const unsigned int  num_local_threads 
)
inline

◆ side()

KOKKOS_FUNCTION unsigned int Moose::Kokkos::MeshDatum::side ( ) const
inlineinherited

◆ subdomain()

KOKKOS_FUNCTION ContiguousSubdomainID Moose::Kokkos::MeshDatum::subdomain ( ) const
inlineinherited

Get the contiguous subdomain ID.

Returns
The contiguous subdomain ID

Definition at line 91 of file KokkosDatum.h.

91{ return _elem.subdomain; }

Referenced by KokkosExtraIDIntegralVectorPostprocessor::execute(), and KokkosExtraIDIntegralVectorPostprocessor::reduce().

◆ system()

KOKKOS_FUNCTION const FESystem & Moose::Kokkos::Datum::system ( unsigned int  sys) const
inline

Member Data Documentation

◆ _assembly

const Assembly& Moose::Kokkos::Datum::_assembly
protected

Reference of the Kokkos assembly.

Definition at line 390 of file KokkosDatum.h.

Referenced by assembly(), J(), q_point(), and reinitTransform().

◆ _cached_qp

unsigned int Moose::Kokkos::Datum::_cached_qp = libMesh::invalid_uint
private

Cached quadrature point index for checking whether the physical transformation data should be recomputed.

Definition at line 428 of file KokkosDatum.h.

Referenced by reinitTransform().

◆ _elem

const ElementInfo Moose::Kokkos::MeshDatum::_elem
protectedinherited

◆ _elem_property_idx

const dof_id_type Moose::Kokkos::Datum::_elem_property_idx = libMesh::DofObject::invalid_id
protected

Index for element-constant material properties.

Definition at line 415 of file KokkosDatum.h.

Referenced by propertyIdx().

◆ _J

Real33 Moose::Kokkos::Datum::_J
private

Cached physical transformation data.

Definition at line 433 of file KokkosDatum.h.

Referenced by J(), and reinitTransform().

◆ _JxW

Real Moose::Kokkos::Datum::_JxW
private

Definition at line 434 of file KokkosDatum.h.

Referenced by JxW(), and reinitTransform().

◆ _local_thread_id

unsigned int Moose::Kokkos::Datum::_local_thread_id = 0
private

Thread ID for local parallelization.

Definition at line 441 of file KokkosDatum.h.

Referenced by local_thread_id(), and set_local_parallel().

◆ _mesh

const Mesh& Moose::Kokkos::MeshDatum::_mesh
protectedinherited

◆ _n_qps

const unsigned int Moose::Kokkos::Datum::_n_qps = 1
protected

Number of local quadrature points.

Definition at line 405 of file KokkosDatum.h.

Referenced by n_qps().

◆ _neighbor

const ElementInfo Moose::Kokkos::MeshDatum::_neighbor
protectedinherited

◆ _node

const ContiguousNodeID Moose::Kokkos::Datum::_node = libMesh::DofObject::invalid_id
protected

Current contiguous node ID.

Definition at line 400 of file KokkosDatum.h.

Referenced by isNodal(), isNodalDefined(), node(), and q_point().

◆ _normal

Real3 Moose::Kokkos::Datum::_normal
private

Definition at line 436 of file KokkosDatum.h.

Referenced by normals(), and reinitTransform().

◆ _num_local_threads

unsigned int Moose::Kokkos::Datum::_num_local_threads = 1
private

Number of threads for local parallelization.

Definition at line 445 of file KokkosDatum.h.

Referenced by num_local_threads(), and set_local_parallel().

◆ _qp_offset

const dof_id_type Moose::Kokkos::Datum::_qp_offset = libMesh::DofObject::invalid_id
protected

Starting offset into the global quadrature point index.

Definition at line 410 of file KokkosDatum.h.

Referenced by propertyIdx(), and qpOffset().

◆ _side

const unsigned int Moose::Kokkos::MeshDatum::_side = libMesh::invalid_uint
protectedinherited

◆ _systems

const Array<FESystem>& Moose::Kokkos::Datum::_systems
protected

Reference of the Kokkos systems.

Definition at line 395 of file KokkosDatum.h.

Referenced by isNodalDefined(), and system().

◆ _xyz

Real3 Moose::Kokkos::Datum::_xyz
private

Definition at line 435 of file KokkosDatum.h.

Referenced by q_point(), and reinitTransform().


The documentation for this class was generated from the following file: