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
269 stars 59 forks source link

Encapsulation of the load balancing in DEM and CFD-DEM #1199

Closed acdaigneault closed 1 month ago

acdaigneault commented 1 month ago

Description

The functions related to the load balancing were implemented in the DEM solver and coupling CFD-DEM solver even tho it is not really specific to the solvers. The setup and the routine were duplicated in both solvers, making modifications or maintenances harder. The solution is the implementation the load balancing class with mostly the same functions. The load balancing is also fixed for the CFD-DEM. It was not working since nov. 2022, oops.

Testing

All tests related to the load balacing in DEM are still passing. A new test spouted_bed_load_balancing_generator.prm was added for the unresolved cfd-dem tests. After a quick fix on the master, results were compared and are the same.

Miscellaneous (will be removed when merged)

It is not fully encapsulated (the load_balance() functions are still implemented in the solvers), but it is the cleanest and easier way to do it to this day with the way the code flags some step (load_balancing, checkpoint, etc...) and executes reinititialization and other stuff.

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

Pull request related list:

acdaigneault commented 1 month ago

Awesome, will merge :)!

I will look into the failling test this PM, probably the rayleigh ratio :)

blaisb commented 1 month ago

Awesome, will merge :)!

I will look into the failling test this PM, probably the rayleigh ratio :)

Yes because the test failed after rebased Absolutely the rayleigh ratio!