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 "return_elements_connected_to_face(face_number)".
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
it has a build-in feature to at multiple attributes to a single element.
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,