Doing 3D shape optimization with mmg3d

Hello, thanks for bring this fantastic platform. I currently have a question about moving the 3D mesh only on the boundary. In 2D case, I am using Freefem adaptmesh : Th = adaptmesh(Th,[ux,uy],hmin=0.1,hmax=0.1); where ux uy are the displacement field. I am wondering if for 3D case mmg3d, should I save the [ux,uy,uz] in a sol file and just provide to mmg3d and it will do it for me. Because it seems the old version mmg3d has the -mov flag option to move the mesh based on the displacement filed.

thank you for your time

Hi @zcwang,

You can find a tutorial on how to use Lagrangian movement in mmg3d (outside freefem) here : Lagrangian motion – Mmg Platform

  1. First you have to install LinearElasticity solver of the ISCD and to build Mmg against it (normally it is automatically detected.
  2. Second you yill have to set a reference 10 to the moving boundary and to provide your velocity field (in a sol file as you state): Mmg will extend this velocity field using the linear elasticity;
  3. You have to run Mmg with the -lag <n> command line argument : if n==0 only node relocation is authorized, if n==1, node relocations and swaps are authorized (so change of connectivity but the number of nodes remains fixed), if n==2 all operators are authorized (node relocation, swaps, node insertion and deletion). Mmg will first apply the maximal possible displacement (so the maximal displacement such as all elements have strictly positive qualities) with the authorized operators. If you apply a too large displacement, the entire displacement will not be performed (option is implemented for small deformations). After that, Mmg perform an additionnal step of improvement of mesh quality (again using only the authorized operators);

I don’t know how it has been interfaced within freefem but I guess that if follow what has been done for the other options of Mmg-5…

I hope that it helps.

Best regards,
Algiane

Thank you for your help, it is absolutely helpful.