14 #ifdef MOOSE_KOKKOS_SCOPE 113 return _maps->_subdomain_elem_ids.at(subdomain);
135 return _maps->_subdomain_node_ids.at(subdomain);
138 #ifdef MOOSE_KOKKOS_SCOPE 163 KOKKOS_FUNCTION
unsigned int getNumSides(
unsigned int elem_type)
const 172 KOKKOS_FUNCTION
unsigned int getNumNodes(
unsigned int elem_type)
const 182 KOKKOS_FUNCTION
unsigned int getNumNodes(
unsigned int elem_type,
unsigned int side)
const 193 unsigned int node)
const 195 return _nodes(node, elem);
206 unsigned int node)
const 317 #ifdef MOOSE_KOKKOS_SCOPE 318 KOKKOS_FUNCTION
inline bool 328 return target != end;
354 #ifdef MOOSE_KOKKOS_SCOPE const auto & getElementTypeMap() const
Get the element type ID map.
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
The Kokkos object that contains the information of an element The IDs used in Kokkos are different fr...
The wrapper of host maps.
void initElement()
Initialize device element data.
dof_id_type ContiguousElementID
const auto & getContiguousNodeMap() const
Get the contiguous node ID map This list contains the nodes of local elements, so some nodes may belo...
std::unordered_map< BoundaryID, ContiguousBoundaryID > _boundary_id_mapping
Map from the MOOSE boundary ID to the contiguous boundary ID.
void initMap()
Initialize host maps.
BoundaryID ContiguousBoundaryID
const auto & getSubdomainContiguousNodeIDs(const SubdomainID subdomain) const
Get the list of contiguous node IDs for a subdomain This list strictly contains the nodes local to th...
Array3D< ContiguousNodeID > _nodes_face
The Kokkos interface that holds the host reference of the Kokkos mesh and copies it to device during ...
KOKKOS_FUNCTION bool isBoundaryNode(ContiguousNodeID node, ContiguousBoundaryID boundary) const
Get whether a node is on a boundary.
KOKKOS_FUNCTION ContiguousNodeID getContiguousNodeID(ContiguousElementID elem, unsigned int side, unsigned int node) const
Get the contiguous node ID for a side.
ContiguousNodeID getContiguousNodeID(const Node *node) const
Get the contiguous node ID of a node.
std::unordered_map< SubdomainID, ContiguousSubdomainID > _subdomain_id_mapping
Map from the MOOSE subdomain ID to the contiguous subdomain ID.
Array< Array< ContiguousNodeID > > _boundary_nodes
Contiguous node IDs on each boundary.
KOKKOS_FUNCTION unsigned int getNumNodes(unsigned int elem_type) const
Get the number of nodes of an element type.
const auto & getSubdomainContiguousElementIDs(const SubdomainID subdomain) const
Get the list of contiguous element IDs for a subdomain.
const MooseMesh & getMesh()
Get the underyling MOOSE mesh.
dof_id_type ContiguousNodeID
const Mesh _mesh_device
Device copy of the Kokkos mesh.
std::unordered_map< SubdomainID, std::unordered_set< ContiguousNodeID > > _subdomain_node_ids
List of the contiguous node IDs in each subdomain This list strictly contains the nodes local to the ...
boundary_id_type BoundaryID
KOKKOS_FUNCTION ContiguousElementID getNeighbor(ContiguousElementID elem, unsigned int side) const
Get the neighbor contiguous element ID.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Mesh(const MooseMesh &mesh)
Constructor.
unsigned int type
Element type ID.
const auto & getContiguousElementMap() const
Get the contiguous element ID map.
MeshHolder(const Mesh &mesh)
Constructor.
KOKKOS_FUNCTION unsigned int getNumNodes(unsigned int elem_type, unsigned int side) const
Get the number of nodes on a side of an element type.
KOKKOS_FUNCTION const auto & getElementInfo(ContiguousElementID elem) const
Get the element information object.
subdomain_id_type SubdomainID
Array2D< ContiguousNodeID > _nodes
Contiguous node IDs of each element and side.
Array2D< ContiguousElementID > _elem_neighbor
Neighbor contiguous element IDs of each element.
KOKKOS_FUNCTION Real3 getNodePoint(ContiguousNodeID node) const
Get the coordinate of a node.
const MooseMesh & _mesh
Reference of the MOOSE mesh.
KOKKOS_FUNCTION const Mesh & kokkosMesh() const
Get the const reference of the Kokkos mesh.
MeshHolder(const MeshHolder &holder)
Copy constructor.
ContiguousSubdomainID subdomain
Contiguous subdomain ID.
Array< Real3 > _points
Node coordinates.
Array< unsigned int > _num_sides
Number of sides of each element type.
ContiguousBoundaryID getContiguousBoundaryID(const BoundaryID boundary) const
Get the contiguous boundary ID of a boundary.
std::unordered_map< const Node *, ContiguousNodeID > _local_node_id_mapping
Map from the libMesh node to the contiguous node ID This list contains the nodes of local elements...
KOKKOS_FUNCTION unsigned int getNumSides(unsigned int elem_type) const
Get the number of sides of an element type.
const Mesh & _mesh_host
Host reference of the Kokkos mesh.
ContiguousElementID getContiguousElementID(const Elem *elem) const
Get the contiguous element ID of an element.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
void update()
Update the mesh.
ContiguousSubdomainID getContiguousSubdomainID(const SubdomainID subdomain) const
Get the contiguous subdomain ID of a MOOSE subdomain.
KOKKOS_FUNCTION ContiguousNodeID getContiguousNodeID(ContiguousElementID elem, unsigned int node) const
Get the contiguous node ID for an element.
std::unordered_map< const Elem *, ContiguousElementID > _local_elem_id_mapping
Map from the libMesh element to the contiguous element ID.
std::shared_ptr< MeshMap > _maps
A shared pointer holding all the host maps to avoid deep copy.
std::unordered_map< SubdomainID, std::unordered_set< ContiguousElementID > > _subdomain_elem_ids
List of the contiguous element IDs in each subdomain.
Array< ElementInfo > _elem_info
Element information.
unsigned int getElementTypeID(const Elem *elem) const
Get the element type ID of an element.
Array< Array< unsigned int > > _num_side_nodes
number of nodes per side of each element side
std::unordered_map< ElemType, unsigned int > _elem_type_id_mapping
Map from the MOOSE element type to the element type ID.
ContiguousElementID id
Contiguous element ID.
Array< unsigned int > _num_nodes
Number of nodes of each element type.