The Kokkos mesh object. More...
#include <KokkosMesh.h>
Classes | |
struct | MeshMap |
The wrapper of host maps. More... | |
Public Member Functions | |
Mesh (const MooseMesh &mesh) | |
Constructor. More... | |
const MooseMesh & | getMesh () |
Get the underyling MOOSE mesh. More... | |
void | update () |
Update the mesh. More... | |
ContiguousSubdomainID | getContiguousSubdomainID (const SubdomainID subdomain) const |
Get the contiguous subdomain ID of a MOOSE subdomain. More... | |
ContiguousBoundaryID | getContiguousBoundaryID (const BoundaryID boundary) const |
Get the contiguous boundary ID of a boundary. More... | |
unsigned int | getElementTypeID (const Elem *elem) const |
Get the element type ID of an element. More... | |
ContiguousElementID | getContiguousElementID (const Elem *elem) const |
Get the contiguous element ID of an element. More... | |
const auto & | getElementTypeMap () const |
Get the element type ID map. More... | |
const auto & | getContiguousElementMap () const |
Get the contiguous element ID map. More... | |
const auto & | getSubdomainContiguousElementIDs (const SubdomainID subdomain) const |
Get the list of contiguous element IDs for a subdomain. More... | |
ContiguousNodeID | getContiguousNodeID (const Node *node) const |
Get the contiguous node ID of a node. More... | |
const auto & | getContiguousNodeMap () const |
Get the contiguous node ID map This list contains the nodes of local elements, so some nodes may belong to other processes. More... | |
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 the current process. More... | |
KOKKOS_FUNCTION const auto & | getElementInfo (ContiguousElementID elem) const |
Get the element information object. More... | |
KOKKOS_FUNCTION ContiguousElementID | getNeighbor (ContiguousElementID elem, unsigned int side) const |
Get the neighbor contiguous element ID. More... | |
KOKKOS_FUNCTION unsigned int | getNumSides (unsigned int elem_type) const |
Get the number of sides of an element type. More... | |
KOKKOS_FUNCTION unsigned int | getNumNodes (unsigned int elem_type) const |
Get the number of nodes of an element type. More... | |
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. More... | |
KOKKOS_FUNCTION ContiguousNodeID | getContiguousNodeID (ContiguousElementID elem, unsigned int node) const |
Get the contiguous node ID for an element. More... | |
KOKKOS_FUNCTION ContiguousNodeID | getContiguousNodeID (ContiguousElementID elem, unsigned int side, unsigned int node) const |
Get the contiguous node ID for a side. More... | |
KOKKOS_FUNCTION Real3 | getNodePoint (ContiguousNodeID node) const |
Get the coordinate of a node. More... | |
KOKKOS_FUNCTION bool | isBoundaryNode (ContiguousNodeID node, ContiguousBoundaryID boundary) const |
Get whether a node is on a boundary. More... | |
Private Member Functions | |
void | initMap () |
Initialize host maps. More... | |
void | initElement () |
Initialize device element data. More... | |
Private Attributes | |
const MooseMesh & | _mesh |
Reference of the MOOSE mesh. More... | |
std::shared_ptr< MeshMap > | _maps |
A shared pointer holding all the host maps to avoid deep copy. More... | |
Array< ElementInfo > | _elem_info |
Element information. More... | |
Array2D< ContiguousElementID > | _elem_neighbor |
Neighbor contiguous element IDs of each element. More... | |
Array< unsigned int > | _num_sides |
Number of sides of each element type. More... | |
Array< unsigned int > | _num_nodes |
Number of nodes of each element type. More... | |
Array< Array< unsigned int > > | _num_side_nodes |
number of nodes per side of each element side More... | |
Array< Real3 > | _points |
Node coordinates. More... | |
Array< Array< ContiguousNodeID > > | _boundary_nodes |
Contiguous node IDs on each boundary. More... | |
Array2D< ContiguousNodeID > | _nodes |
Contiguous node IDs of each element and side. More... | |
Array3D< ContiguousNodeID > | _nodes_face |
The Kokkos mesh object.
Definition at line 54 of file KokkosMesh.h.
|
inline |
Constructor.
mesh | The MOOSE mesh |
Definition at line 61 of file KokkosMesh.h.
ContiguousBoundaryID Moose::Kokkos::Mesh::getContiguousBoundaryID | ( | const BoundaryID | boundary | ) | const |
Get the contiguous boundary ID of a boundary.
boundary | The MOOSE boundary ID |
ContiguousElementID Moose::Kokkos::Mesh::getContiguousElementID | ( | const Elem * | elem | ) | const |
Get the contiguous element ID of an element.
elem | The libMesh element |
|
inline |
Get the contiguous element ID map.
Definition at line 105 of file KokkosMesh.h.
ContiguousNodeID Moose::Kokkos::Mesh::getContiguousNodeID | ( | const Node * | node | ) | const |
Get the contiguous node ID of a node.
node | The libMesh node |
|
inline |
Get the contiguous node ID for an element.
elem | The contiguous element ID |
node | The node index |
Definition at line 192 of file KokkosMesh.h.
|
inline |
Get the contiguous node ID for a side.
elem | The contiguous element ID |
side | The side index |
node | The node index |
Definition at line 204 of file KokkosMesh.h.
|
inline |
Get the contiguous node ID map This list contains the nodes of local elements, so some nodes may belong to other processes.
Definition at line 126 of file KokkosMesh.h.
ContiguousSubdomainID Moose::Kokkos::Mesh::getContiguousSubdomainID | ( | const SubdomainID | subdomain | ) | const |
Get the contiguous subdomain ID of a MOOSE subdomain.
subdomain | The MOOSE subdomain ID |
|
inline |
Get the element information object.
elem | The contiguous element ID |
Definition at line 144 of file KokkosMesh.h.
unsigned int Moose::Kokkos::Mesh::getElementTypeID | ( | const Elem * | elem | ) | const |
Get the element type ID of an element.
elem | The libMesh element |
|
inline |
Get the element type ID map.
Definition at line 100 of file KokkosMesh.h.
|
inline |
Get the underyling MOOSE mesh.
Definition at line 66 of file KokkosMesh.h.
|
inline |
Get the neighbor contiguous element ID.
elem | The contiguous element ID |
side | The side index |
Definition at line 154 of file KokkosMesh.h.
|
inline |
Get the coordinate of a node.
node | The contiguous node ID |
Definition at line 215 of file KokkosMesh.h.
Referenced by Moose::Kokkos::Assembly::computePhysicalMap().
|
inline |
Get the number of nodes of an element type.
elem_type | The element type ID |
Definition at line 172 of file KokkosMesh.h.
Referenced by Moose::Kokkos::Assembly::computePhysicalMap().
|
inline |
Get the number of nodes on a side of an element type.
elem_type | The element type ID |
side | The side index |
Definition at line 182 of file KokkosMesh.h.
|
inline |
Get the number of sides of an element type.
elem_type | The element type ID |
Definition at line 163 of file KokkosMesh.h.
|
inline |
Get the list of contiguous element IDs for a subdomain.
subdomain | The MOOSE subdomain ID |
Definition at line 111 of file KokkosMesh.h.
|
inline |
Get the list of contiguous node IDs for a subdomain This list strictly contains the nodes local to the current process.
subdomain | The MOOSE subdomain ID |
Definition at line 133 of file KokkosMesh.h.
|
private |
Initialize device element data.
|
private |
Initialize host maps.
|
inline |
Get whether a node is on a boundary.
node | The contiguous node ID |
boundary | The contiguous boundary ID |
Definition at line 319 of file KokkosMesh.h.
void Moose::Kokkos::Mesh::update | ( | ) |
Update the mesh.
|
private |
Contiguous node IDs on each boundary.
Definition at line 314 of file KokkosMesh.h.
Referenced by isBoundaryNode().
|
private |
|
private |
Neighbor contiguous element IDs of each element.
Definition at line 287 of file KokkosMesh.h.
Referenced by getNeighbor().
|
private |
A shared pointer holding all the host maps to avoid deep copy.
Definition at line 278 of file KokkosMesh.h.
Referenced by getContiguousElementMap(), getContiguousNodeMap(), getElementTypeMap(), getSubdomainContiguousElementIDs(), and getSubdomainContiguousNodeIDs().
|
private |
|
private |
Contiguous node IDs of each element and side.
Definition at line 308 of file KokkosMesh.h.
Referenced by getContiguousNodeID().
|
private |
Definition at line 309 of file KokkosMesh.h.
Referenced by getContiguousNodeID().
Number of nodes of each element type.
Definition at line 295 of file KokkosMesh.h.
Referenced by getNumNodes().
number of nodes per side of each element side
Definition at line 299 of file KokkosMesh.h.
Referenced by getNumNodes().
Number of sides of each element type.
Definition at line 291 of file KokkosMesh.h.
Referenced by getNumSides().