Remeshing (using gmsh?)


I’ve got a question regarding remeshing in fenics. I generate my mesh using gmsh (and meshio), and solve a shape optimization problem where I want to be able to remesh my geometry (using whatever conditions) after it has been deformed.

I wanted to ask whether there is a “simple” way of converting my deformed mesh / geometry into a mesh or geometry file for gmsh so that I can remesh the whole thing there. Of course, I can use meshio again to generate, e.g., an .xdmf file of my mesh and convert this to a .msh file, but gmsh cannot really work with a mesh file as input, and the CreateGeometry command (which is available in newer versions) does not do the trick.

Maybe someone has had similar issues and can give me a hint how to do this remeshing in a simple manner. Thank you.