Commit 4b497bd7 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Drift all particles to end point before dumping the final snapshot

parent ed288f25
...@@ -676,6 +676,7 @@ int main(int argc, char *argv[]) { ...@@ -676,6 +676,7 @@ int main(int argc, char *argv[]) {
#endif #endif
/* Write final output. */ /* Write final output. */
engine_drift_all(&e);
engine_dump_snapshot(&e); engine_dump_snapshot(&e);
#ifdef WITH_MPI #ifdef WITH_MPI
......
...@@ -2613,12 +2613,6 @@ void engine_rebuild(struct engine *e) { ...@@ -2613,12 +2613,6 @@ void engine_rebuild(struct engine *e) {
* @brief Prepare the #engine by re-building the cells and tasks. * @brief Prepare the #engine by re-building the cells and tasks.
* *
* @param e The #engine to prepare. * @param e The #engine to prepare.
* @param drift_all Whether to drift particles before rebuilding or not. Will
* not be necessary if all particles have already been
* drifted (before repartitioning for instance).
* @param postrepart If we have just repartitioned, if so we need to defer the
* skip until after the rebuild and not check the if all
* cells have been drifted.
*/ */
void engine_prepare(struct engine *e) { void engine_prepare(struct engine *e) {
......
...@@ -2557,12 +2557,12 @@ void space_link_cleanup(struct space *s) { ...@@ -2557,12 +2557,12 @@ void space_link_cleanup(struct space *s) {
} }
/** /**
* @brief Checks that all cells have been drifted to the current point in time * @brief Checks that all cells have been drifted to a given point in time
* *
* Expensive function. Should only be used for debugging purposes. * Expensive function. Should only be used for debugging purposes.
* *
* @param s The #space to check. * @param s The #space to check.
* @param ti_current The (integer) time. * @param ti_drift The (integer) time.
*/ */
void space_check_drift_point(struct space *s, integertime_t ti_drift) { void space_check_drift_point(struct space *s, integertime_t ti_drift) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment