-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hello,
I noticed that m_h_patches_ltog_v/e/f seem to be used only during the construction of the RXMeshStatic object, and they are not referenced afterward. In particular, update_host() does not appear to update the ltog mappings.
Does this imply that one of RXMesh’s design principles is to discard the original vertex/face ordering from the input .obj file and instead focus purely on local neighborhood and patch-based representations? As a consequence, the vertex order in an exported .obj file can differ significantly from the original ordering, with the exported order being determined by RXMesh’s internal patch layout rather than the input file.
On a related note, vertex attributes and face topology in RXMesh are not stored contiguously in global memory, but rather in a patch-wise layout. Therefore, it seems infeasible to directly expose device-side data structures such as m_input_vertex_coordinates and PatchInfo::fe as torch::Tensor views for vertices and faces.
However, it is still possible to perform relatively low-cost device-to-device copies to reconstruct contiguous tensors on the GPU. My current idea is the following:
(1) After each kernel that modifies topology, call
cleanup()to update internal structures such asm_d_vertex_prefix.
(2) Use
m_d_vertex_prefixandactive_maskto scatter/gather vertex values and face connectivity into newly allocated contiguous device tensors.
(3) Expose these tensors to PyTorch for downstream computation.
I would like to ask whether this approach is considered safe and consistent with RXMesh’s intended design, or whether there are potential pitfalls I should be aware of.
Thank you very much for your time and for the excellent RXMesh framework!