-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Simulation::exit with mardyn_exit #334
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of files now got a new #include "Simulation.h"
. Was this on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer a bit more of a "let it crash and burn" philosophy, meaning, that if something is misconfigured I'd rather abort a simulation instead of continuing with a different setting. Usually when we configure something we do it for a reason and don't expect the code to do something different which we would only realize after inspecting the logs. A crash error message would be clearer.
Apart from that I'm fine with the changes!
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... |
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 withmardyn_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:solved byPlanar.cpp
since it requiresSimulation
as one argument of its methodsclass Simulation;
instead if#include
). Therefore, I had to moveDomain::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.