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

Set initial simulation time step earlier #313

Closed HomesGH closed 4 months ago

HomesGH commented 4 months ago

Description

Until now, the initial time step is set at the end of Simulation::prepare_start(). At this point, the plugins are already initialized which could lead to a wrong initializations of them. An example is the MMPLDWriter, which uses the number of simulation steps to calculate the file header of the .mmpld files during initialization.

The simulationTime (physical time, not time step) can be either changed by the config (currenttime) or the checkpoints. The calculation of the initial time step is now moved to right after the simulationTime was changed the last time before the actual simulation starts.

Test:

Result of test:

HomesGH commented 4 months ago

Did you do the test you announced in the PR description? ;)

Yes, I just did it. See Description of PR for details