Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get region attributes when regionattrib flag is 1 #22

Open
Togela opened this issue Nov 16, 2020 · 0 comments
Open

Get region attributes when regionattrib flag is 1 #22

Togela opened this issue Nov 16, 2020 · 0 comments

Comments

@Togela
Copy link

Togela commented Nov 16, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant