The Kokkos mesh object. More...
#include <KokkosMesh.h>
Classes | |
| struct | MeshMap |
| The wrapper of host maps. More... | |
Public Member Functions | |
| Mesh (MooseMesh &mesh) | |
| Constructor. More... | |
| const MooseMesh & | getMesh () |
| Get the underyling MOOSE mesh. More... | |
| bool | initialized () const |
| Get whether the mesh was initialized. More... | |
| void | update () |
| Update the mesh. More... | |
| auto | getNumSubdomains () const |
| Get the number of subdomains. More... | |
| auto | getNumLocalElementTypes () const |
| Get the number of local elements types. More... | |
| const auto & | getElementTypeMap () const |
| Get the element type ID map. More... | |
| auto | getNumLocalElements () const |
| Get the number of local elements. More... | |
| auto | getNumSubdomainLocalElements (const SubdomainID subdomain) const |
| Get the number of local elements in a MOOSE subdomain. More... | |
| auto | getNumLocalNodes () const |
| Get the number of local nodes including semi-local nodes. More... | |
| const auto & | getLocalNodes () const |
| Get the list of local nodes including semi-local nodes. 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... | |
| auto | getSubdomainContiguousElementIDRange (const SubdomainID subdomain) const |
| Get the range 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 & | getSubdomainContiguousNodeIDs (const SubdomainID subdomain) const |
| Get the list of local contiguous node IDs for a subdomain NOTE: This list excludes semi-local nodes. More... | |
| const auto & | getBoundaryContiguousNodeIDs (const BoundaryID boundary) const |
| Get the list of local contiguous node IDs for a boundary NOTE: This list excludes semi-local nodes. 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 dof_id_type | getExtraElementID (ContiguousElementID elem, unsigned int index) const |
| Get the extra element ID of an element. More... | |
| KOKKOS_FUNCTION dof_id_type | getStartingContiguousElementID (ContiguousSubdomainID subdomain) const |
| Get the starting contiguous element ID of a subdomain. More... | |
| KOKKOS_FUNCTION ContiguousNodeID | getContiguousNodeID (ContiguousElementID elem, unsigned int node) const |
| Get the contiguous node ID for an element. More... | |
| KOKKOS_FUNCTION ContiguousNodeID | getContiguousNodeID (ElementInfo info, 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 | |
| MooseMesh & | _mesh |
| Reference of the MOOSE mesh. More... | |
| bool | _initialized = false |
| Flag whether the mesh was initialized. More... | |
| std::shared_ptr< MeshMap > | _maps |
| A shared pointer holding all the host maps to avoid deep copy. More... | |
| unsigned int | _elem_id_integer = libMesh::invalid_uint |
| Element integer for Kokkos contiguous element ID. More... | |
| unsigned int | _node_id_integer = libMesh::invalid_uint |
| Node integer for Kokkos contiguous node ID. More... | |
| dof_id_type | _num_local_elems = 0 |
| Number of local elements. More... | |
| dof_id_type | _num_local_nodes = 0 |
| Number of local nodes including semi-local nodes. More... | |
| Array< ElementInfo > | _elem_info |
| Element information. More... | |
| Array2D< ContiguousElementID > | _elem_neighbor |
| Neighbor contiguous element IDs of each element. More... | |
| Array< ContiguousElementID > | _starting_elem_id |
| Starting contiguous element ID of each subdomain. More... | |
| Array2D< dof_id_type > | _extra_elem_ids |
| Extra element IDs. 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< Array2D< unsigned int > > | _local_side_node |
| Map from local side node index to local element node index. More... | |
| Array< Real3 > | _points |
| Node coordinates. More... | |
| Array2D< ContiguousNodeID > | _nodes |
| Contiguous node IDs of each element. More... | |
| Array< Array< ContiguousNodeID > > | _boundary_nodes |
| Contiguous node IDs on each boundary. More... | |
The Kokkos mesh object.
Definition at line 52 of file KokkosMesh.h.
|
inline |
Constructor.
| mesh | The MOOSE mesh |
Definition at line 59 of file KokkosMesh.h.
|
inline |
Get the list of local contiguous node IDs for a boundary NOTE: This list excludes semi-local nodes.
| boundary | The MOOSE boundary ID |
Definition at line 170 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 |
| 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 249 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 261 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 180 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 88 of file KokkosMesh.h.
|
inline |
Get the extra element ID of an element.
| elem | The contiguous element ID |
| index | The extra element ID index |
Definition at line 228 of file KokkosMesh.h.
Referenced by Moose::Kokkos::Datum::extraElemID().
|
inline |
Get the list of local nodes including semi-local nodes.
Definition at line 113 of file KokkosMesh.h.
|
inline |
Get the underyling MOOSE mesh.
Definition at line 64 of file KokkosMesh.h.
|
inline |
Get the neighbor contiguous element ID.
| elem | The contiguous element ID |
| side | The side index |
Definition at line 190 of file KokkosMesh.h.
|
inline |
Get the coordinate of a node.
| node | The contiguous node ID |
Definition at line 272 of file KokkosMesh.h.
Referenced by Moose::Kokkos::Assembly::computePhysicalMap(), and Moose::Kokkos::Datum::q_point().
|
inline |
Get the number of local elements.
Definition at line 93 of file KokkosMesh.h.
|
inline |
Get the number of local elements types.
Definition at line 83 of file KokkosMesh.h.
|
inline |
Get the number of local nodes including semi-local nodes.
Definition at line 108 of file KokkosMesh.h.
|
inline |
Get the number of nodes of an element type.
| elem_type | The element type ID |
Definition at line 208 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 218 of file KokkosMesh.h.
|
inline |
Get the number of sides of an element type.
| elem_type | The element type ID |
Definition at line 199 of file KokkosMesh.h.
|
inline |
Get the number of local elements in a MOOSE subdomain.
| subdomain | The MOOSE subdomain ID |
Definition at line 99 of file KokkosMesh.h.
|
inline |
Get the number of subdomains.
Definition at line 78 of file KokkosMesh.h.
|
inline |
Get the starting contiguous element ID of a subdomain.
| subdomain | The contiguous subdomain ID |
Definition at line 239 of file KokkosMesh.h.
|
inline |
Get the range of contiguous element IDs for a subdomain.
| subdomain | The MOOSE subdomain ID |
Definition at line 143 of file KokkosMesh.h.
|
inline |
Get the list of local contiguous node IDs for a subdomain NOTE: This list excludes semi-local nodes.
| subdomain | The MOOSE subdomain ID |
Definition at line 160 of file KokkosMesh.h.
|
private |
Initialize device element data.
|
inline |
Get whether the mesh was initialized.
Definition at line 68 of file KokkosMesh.h.
Referenced by Moose::Kokkos::MeshHolder::kokkosMesh().
|
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 411 of file KokkosMesh.h.
Referenced by KokkosBoundNodalKernel::skipOnBoundary().
| void Moose::Kokkos::Mesh::update | ( | ) |
Update the mesh.
|
private |
Contiguous node IDs on each boundary.
Definition at line 406 of file KokkosMesh.h.
Referenced by isBoundaryNode().
|
private |
Element integer for Kokkos contiguous element ID.
Definition at line 350 of file KokkosMesh.h.
|
private |
|
private |
Neighbor contiguous element IDs of each element.
Definition at line 370 of file KokkosMesh.h.
Referenced by getNeighbor().
|
private |
|
private |
Flag whether the mesh was initialized.
Definition at line 299 of file KokkosMesh.h.
Referenced by initialized().
Map from local side node index to local element node index.
Definition at line 394 of file KokkosMesh.h.
Referenced by getContiguousNodeID().
|
private |
A shared pointer holding all the host maps to avoid deep copy.
Definition at line 345 of file KokkosMesh.h.
Referenced by getBoundaryContiguousNodeIDs(), getElementTypeMap(), getLocalNodes(), getNumLocalElementTypes(), getNumSubdomainLocalElements(), getNumSubdomains(), getSubdomainContiguousElementIDRange(), and getSubdomainContiguousNodeIDs().
|
private |
|
private |
Node integer for Kokkos contiguous node ID.
Definition at line 354 of file KokkosMesh.h.
|
private |
Contiguous node IDs of each element.
Definition at line 402 of file KokkosMesh.h.
Referenced by getContiguousNodeID().
|
private |
Number of local elements.
Definition at line 358 of file KokkosMesh.h.
Referenced by getNumLocalElements().
|
private |
Number of local nodes including semi-local nodes.
Definition at line 362 of file KokkosMesh.h.
Referenced by getNumLocalNodes().
Number of nodes of each element type.
Definition at line 386 of file KokkosMesh.h.
Referenced by getNumNodes().
Number of nodes per side of each element side.
Definition at line 390 of file KokkosMesh.h.
Referenced by getNumNodes().
Number of sides of each element type.
Definition at line 382 of file KokkosMesh.h.
Referenced by getNumSides().
|
private |
Starting contiguous element ID of each subdomain.
Definition at line 374 of file KokkosMesh.h.
Referenced by getStartingContiguousElementID().
1.8.14