ls1mardyn / ls1-mardyn

ls1-MarDyn is a massively parallel Molecular Dynamics (MD) code for large systems. Its main target is the simulation of thermodynamics and nanofluidics. ls1-MarDyn is designed with a focus on performance and easy extensibility.
http://www.ls1-mardyn.de
Other
28 stars 15 forks source link

Replace Simulation::exit with mardyn_exit #334

Closed HomesGH closed 2 months ago

HomesGH commented 2 months ago

Description

Simulation.h is included in many files and can easily lead to some chaos due to circular dependency (as @FG-TUM mentioned). Therefore, this PR replaces the Simulation::exit() method with mardyn_exit() since this only requires the include of mardyn_assert. The Simulation::exit() method is also deleted.

During the replacement, I paid attention to no include the Simulation.h in any header file (~exception: Planar.cpp since it requires Simulation as one argument of its methods~ solved by class Simulation; instead if #include). Therefore, I had to move Domain::setComponentThermostat from the header to the cpp file.

What became apparent during the replacement: A lot of files use global_simulation or _simulation, e.g. to get the ensemble.

HomesGH commented 2 months ago

Ok, it’s actually AutoPas which breaks the CI…

FG-TUM commented 2 months ago

Ok, it’s actually AutoPas which breaks the CI…

This is what I meant. So the clean thing would be to adapt the tests. But this is ls1, so I personally could also live with going back to the previous philosophy of (almost) silent changes in behavior and cheating the tests just for the sake of getting the rest of this PR towards master...