On 08/25/2017 02:59 PM, Kathrin Sobe wrote:
For one of my questions: I found a way to extract the surface facets of the 3D object by using:
surface = domain.create_region('Surface', 'vertices of surface', 'facet')The result is a number of facet indexes. Could you provide more details about the indexing of the facets according to the mesh definition? In my understanding I will need that to match the force vectors at the surface with the corresponding facet. Thank you again.
For example, for the region 'top' in your script:
top.faces is a list of faces of the region.
top.get_facet_indices() returns the corresponding list of (cell, face) pairs, with face numbering as what the following command shows:
./script/plot_mesh.py meshes/elements/3_4_1.mesh
It is also possible to get the vertices defining the faces, or cell-face connectivity, or any other. For example
vof = mesh.cmesh.get_incident(0, top.faces, 2).reshape((-1, 3))
gives you vertices of each face in the top region, that can be used to index mesh.coors (mesh.coors[vof]).
See also my previous message.
r.
Regards, Kathrin
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/