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.
Please consider the answer i gave here: Re-meshing in fluid structure interaction
I must have missed this question earlier on.
Thanks a lot. I already discovered FEMorph, but I will take a look at this again soon.
@plugged , just curious, Since in working on shape optimization problems myself, what kind of problems do you want to solve? If you want the discretely consistent shape gradient, there is support for this in dolfin-adjoint, see for instance this example: http://www.dolfin-adjoint.org/en/release/documentation/stokes-shape-opt/stokes_problem.html
@dokken I’m working on the optimization of a continuous flow reactor, so I have a mixture of transport and fluid equations as constraints.
I knew that there exist certain possibilities for computing gradients of optimal control problems with dolfin-adjoint, but I wasn’t aware that it can also be used for shape optimization. Anyway, I’m considering a optimize then discretize approach, so I don’t think I’d use this for the computation, but I may use this as a validation tool.
I started working on the shape optimization implementation in dolfin-adjoint ~1.5 years ago. We released it to master in february. Currently wrapping up a paper on the subject.