This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

extract geometry data from dolfin.mesh

+1 vote

Say I have a mesh.xml file, that I load to get a dolfin.Mesh .

To specify subdomains I would like to extract approximate coordinates of some specific points of the mesh.

What is a good way to do this?

A graphical or interactive solution is OK, since I will need to do it only a couple of times. But I don't want to go through the xml file.

asked Jan 29, 2014 by Jan FEniCS User (8,290 points)

1 Answer

+3 votes
 
Best answer

Try

from dolfin import *
mesh = Mesh('test.xml')
plot(mesh)
interactive()

Press cv in the plot window, pick out the vortex indices interesting for you, and check their coordinates in the XML-file.

answered Jan 29, 2014 by nschloe FEniCS User (7,120 points)
selected Jan 29, 2014 by Jan
...