Oliver Wroblowski <o.wroblowski(a)uni-wuppertal.de> writes:
I am currently starting to use meshpy and encountered the following problem:
I assign face_markers via mesh_info.set_facets(facets, markers=markers) and
refine some regions using mesh_info.region[i] =[x,y,z, marker, volume].
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
and element_attributes as desired by referring to the corresponding mesh
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
can't 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,