chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
GNU Lesser General Public License v2.1
270 stars 59 forks source link

Nitsche model restart does not work with simplices #275

Closed blaisb closed 2 months ago

blaisb commented 2 years ago

The current code does not write the simplex mesh for the immersed boundary and thus, when restarting will crash. Depending on the difficulty of serializing meshes that are made of simplices, this may be hard or difficult to do :)

anicusan commented 1 year ago

The main advantage of the IB in our cases was that we can avoid the hexahedral meshing of very complex geometries; it's great that we can use a refined, simple hexahedral background mesh and a tetrahedralization of the complex bodies inside.

Writing simplex Nitsche meshes when checkpointing simulations would be very useful when running long jobs on shared HPCs that limit the maximum walltime. I don't see any special handling of hex over tet meshes in source/core/solid_base.cc, just:

  if (auto tria = dynamic_cast<parallel::distributed::Triangulation<dim> *>(
        this->solid_tria.get()))
    {
      std::string triangulationName = prefix + ".triangulation";
      tria->save(prefix + ".triangulation");
    }

Does the mesh serialization need to be done in deal.II? If not, would you have any pointers as to where to start with this? Apologies if my issues sound more like asking for guidance than concise problem-solving - I can follow Lethe's architecture, but using deal.II is a bigger step...

blaisb commented 1 year ago

Dear @anicusan that's a very good question. I am not sure what's the exact issue with the checkpoint of simplex meshes right now as I have not tried it in a while. I know at the time we encountered challenges (hence this issue). Give me a day or two and I can try it on my side of things this week to see if there's any bug left and if they can be fixed. I'll message you after that :). I think I can come up with a fix since my understanding of these classes has improved over time :)!