Currently, the way in which we retrieve element connectivity data to construct BVHs with GPRT relies on producing an internal mapping from global connectivity to a local subset for that surface/volume:
handles = get_adjacencies(...) // global vertex EntityHandles for this subset (surface/volume)
local_index_map = {}
for each handle in handles:
local_index_map[handle] = next local index (0, 1, 2, ...)
for each face/cell in subset:
conn = get_connectivity(...) // connectivity in terms of global handles/IDs
Convert global_connectivity indices to local_connectivity
return local_connectivity
But as suggested in the comments of #201
Now that we have the ability to index into the global set of vertices, does it make sense to redefine our connectivity based on those indices instead of the local indices produced by the get_adjacencies call? If this were the case, then all of this could possibly be implemented at a higher level in the abstract mesh manager itself, which would then apply to libMesh meshes too.
I'll recognize though that there may be cases where we'd like to offload only pieces of the mesh to device at some point and that may be more challenging if our indices assume all the vertices are present on device.
If we were to offload a global vertex buffer to device (separate from these calls) then we could collect connectivity with global indices for each volume and apply it on device that way right?
There may be a viable route to making use of the new MeshIndex system in place to remove the need for that global-local mapping and make things a little more abstract allowing most of the work to be done at the MeshManager level, hence making it easier to bring this functionality to libmesh too.
Currently, the way in which we retrieve element connectivity data to construct BVHs with GPRT relies on producing an internal mapping from global connectivity to a local subset for that surface/volume:
But as suggested in the comments of #201
There may be a viable route to making use of the new MeshIndex system in place to remove the need for that global-local mapping and make things a little more abstract allowing most of the work to be done at the MeshManager level, hence making it easier to bring this functionality to libmesh too.