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.
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 single element.
Hope my request is clearer now,
Von: Andreas Kloeckner [mailto:email@example.com]
Gesendet: Donnerstag, 22. September 2016 01:31
An: Oliver Wroblowski; meshpy(a)tiker.net
Betreff: Re: [MeshPy] Multiple element attributes
Oliver Wroblowski <o.wroblowski(a)uni-wuppertal.de> writes:
I am currently starting to use meshpy and encountered the following
I assign face_markers via mesh_info.set_facets(facets,
markers=markers) and refine some regions using mesh_info.region[i]
You didn't mention whether you are talking about the triangle or the tetgen
interface, I'll assume triangle.
This is working so far and after building the mesh I get the
face_markers and element_attributes as desired by referring to the
corresponding mesh attributes.
However, doing this I no longer have any information about the element
belonging to a "marked" face. Therefore, I want to assign
mesh_info.number_of_element_attributes = 2 and use the additional
element_attributes to directly relate the marked face's index, the
marker and its corresponding elements.
For instance, I would like to have the output of
mesh.element_attributes become something like:
[[5, 1, 14], [6, 1,14],.,[face_nr, marker_id, region_marker]]
Is there a convenient way already implemented to achieve this or does
someone has some kind of workaround for this?
I'm not sure I'm understanding what you're asking. Element attributes
be used to track face level information. "number_of_element_attributes" is
writable though, and writing to it will adjust the associated list sizes as
you would expect.
Hope that helps,