Hello everyone.
When the regionattrib flag (or -A in tetgen) is set to 1, tetgen should return the region attributes for each created tetrahedron.
As far as I can comprehend it, no such data is created.
In the following is an example code to create a nested body which should result in a mesh with two different regions.
import pyvista as pvimport tetgenspherebig = pv.Sphere(1, (0,0,0))spheresmall = pv.Sphere(0.5, (0,0,0))allspheres = spherebig.boolean_add(spheresmall)v = allspheres.pointsf = allspheres.faces.reshape(-1, 4)[:, 1:]tet = tetgen.TetGen(v, f)nodes, elems = tet.tetrahedralize(regionattrib=1)
Hello everyone. When the regionattrib flag (or -A in tetgen) is set to 1, tetgen should return the region attributes for each created tetrahedron. As far as I can comprehend it, no such data is created.
In the following is an example code to create a nested body which should result in a mesh with two different regions.
import pyvista as pv
import tetgen
spherebig = pv.Sphere(1, (0,0,0))
spheresmall = pv.Sphere(0.5, (0,0,0))
allspheres = spherebig.boolean_add(spheresmall)
v = allspheres.points
f = allspheres.faces.reshape(-1, 4)[:, 1:]
tet = tetgen.TetGen(v, f)
nodes, elems = tet.tetrahedralize(regionattrib=1)