adamantine-sim / adamantine

Software to simulate heat transfer for additive manufacturing
https://adamantine-sim.github.io/adamantine/
Other
32 stars 9 forks source link

Fix a bug when depositin material in parallel #248

Closed Rombur closed 9 months ago

Rombur commented 9 months ago

This PR fixes #247 The way the code was working was the following: we compute all the cells that are activated as part of the material deposition and we associate a time stamp them. Then we need to add material, we search for the cells that need to be activated given their time stamp. When the mesh is refine, we recompute the new cells to activate. The issue is that adding material triggers a mesh repartitioning and the cells that needed to be activated may have moved to a different processor. In debug mode this causes the code to crash because we are not allowed to activate a cell that is not locally owned. In release mode, the code keeps running but the cells are not activated anymore. The solution is to recompute the cells to activate every time that we want to add material.