Closed Eydcao closed 1 year ago
Hi Yadi,
Sorry for the late reply due to my vacation. Currently ti.Mesh
doesn't support accessing mesh relations directly by a global index (mesh attribute is ok using syntax like mesh.verts.x[g_idx]
) since these accesses will not enjoy acceleration from the MeshTaichi framework.
However, we refer users to export the relations they want to directly access as common Taichi fields and then access them using a global index, like:
Hope this is helpful! Feel free to contact me if you have further questions.
Sincerely, Chang Yu
Thanks Chang!
Please let me know when (if possible) you like to add this function. I can do some help. Currently we can close this issue.
Best, Yadi
Dear Chang,
I am writing to request your assistance in addressing an issue. Specifically, I am trying to use global indices to access a certain element. Unfortunately, currently, the mesh object does not currently support global access to a MemberField by an index.
One example is that I would like to use an integer to indicate in which tetrahedron a particle lies inside. Then, once I have identified the tetrahedron, I can use its relationship with vertices to perform additional operations. Here is an example code:
I am wondering if it is difficult to implement global access to a MemberField by an index, or if this feature is simply obsolete. If it is obsolete, I would greatly appreciate any advice you can offer on how to work around this issue.
Thank you for your time and assistance.
Sincerely, Yadi