Skip to content
Snippets Groups Projects
Commit 5ee2948e authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Cleaning-up

parent d806b395
No related branches found
No related tags found
1 merge request!167Kick task for fixdt and proper treatment of conserved quantities
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
/* Config parameters. */ /* Config parameters. */
#include "../config.h" #include "../config.h"
/* Local headers. */
#include "const.h"
#include "debug.h"
/** /**
* @brief Perform the 'kick' operation on a #gpart * @brief Perform the 'kick' operation on a #gpart
* *
......
...@@ -989,6 +989,10 @@ void runner_do_kick_fixdt(struct runner *r, struct cell *c, int timer) { ...@@ -989,6 +989,10 @@ void runner_do_kick_fixdt(struct runner *r, struct cell *c, int timer) {
updated++; updated++;
if (p->gpart != NULL) g_updated++; if (p->gpart != NULL) g_updated++;
/* Minimal time for next end of time-step */
ti_end_min = min(p->ti_end, ti_end_min);
ti_end_max = max(p->ti_end, ti_end_max);
/* Now collect quantities for statistics */ /* Now collect quantities for statistics */
const double x[3] = {p->x[0], p->x[1], p->x[2]}; const double x[3] = {p->x[0], p->x[1], p->x[2]};
...@@ -1013,10 +1017,6 @@ void runner_do_kick_fixdt(struct runner *r, struct cell *c, int timer) { ...@@ -1013,10 +1017,6 @@ void runner_do_kick_fixdt(struct runner *r, struct cell *c, int timer) {
v_full[2] * v_full[2]); v_full[2] * v_full[2]);
e_pot += 0.f; /* No gravitational potential thus far */ e_pot += 0.f; /* No gravitational potential thus far */
e_int += hydro_get_internal_energy(p); e_int += hydro_get_internal_energy(p);
/* Minimal time for next end of time-step */
ti_end_min = min(p->ti_end, ti_end_min);
ti_end_max = max(p->ti_end, ti_end_max);
} }
} }
...@@ -1246,6 +1246,10 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) { ...@@ -1246,6 +1246,10 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) {
if (p->gpart != NULL) g_updated++; if (p->gpart != NULL) g_updated++;
} }
/* Minimal time for next end of time-step */
ti_end_min = min(p->ti_end, ti_end_min);
ti_end_max = max(p->ti_end, ti_end_max);
/* Now collect quantities for statistics */ /* Now collect quantities for statistics */
const double x[3] = {p->x[0], p->x[1], p->x[2]}; const double x[3] = {p->x[0], p->x[1], p->x[2]};
...@@ -1270,10 +1274,6 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) { ...@@ -1270,10 +1274,6 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) {
v_full[2] * v_full[2]); v_full[2] * v_full[2]);
e_pot += 0.f; /* No gravitational potential thus far */ e_pot += 0.f; /* No gravitational potential thus far */
e_int += hydro_get_internal_energy(p); e_int += hydro_get_internal_energy(p);
/* Minimal time for next end of time-step */
ti_end_min = min(p->ti_end, ti_end_min);
ti_end_max = max(p->ti_end, ti_end_max);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment