You were right about this:
Tetgen provides the "-n" switch and generates .neighbor-file like data.
It can be accessed via mesh.neighbor as expected after building the mesh.
It is still only information about connected tetrahedra (not faces) but this
will do for me.
Thank you for your fast replies,
Von: Andreas Kloeckner [mailto:firstname.lastname@example.org]
Gesendet: Donnerstag, 22. September 2016 15:38
An: Oliver Wroblowski; meshpy(a)tiker.net
Betreff: Re: AW: [MeshPy] Multiple element attributes
Oliver Wroblowski <o.wroblowski(a)uni-wuppertal.de> writes:
I am currently using tetgen.
I will put it a bit differently.
In my analysis I need to know which elements are attached to which faces.
For instance, I would like to iterate over the mesh.faces array and
for each entry I need to know the connected elements. In terms of
functions this means something like
I was just curious, if there is already an implemented (efficient)
function or attribute providing such information.
Yet, I figured out some timeconsuming workaround. By constructing the
four faces for each element and comparing with the entries of
mesh.faces, I am able to build up the information by my own.
This information should already be exposed in "mesh_info.neighbors". You
might have to set an option to make sure it actually gets generated--consult
the tetgen docs for that.
Mesh.element_attributes was just my first choice to store the
information as it has a build-in feature to at multiple attributes to a
I'd probably recommend building your own data structure at this point rather
than trying to shoehorn something into Tetgen's/meshpy's.
Hope that helps,