Commit 8d3bf0c4 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Post-merge fixes

parent d78c5419
......@@ -2504,11 +2504,11 @@ void engine_step(struct engine *e) {
FILE *file = fopen("grav_swift.dat", "w");
for (size_t k = 0; k < s->nr_gparts; ++k) {
fprintf(file, "%lld %f %f %f %e %e %e\n", s->gparts[k].id,
fprintf(file, "%lld %f %f %f %e %e %e\n", s->gparts[k].id_or_neg_offset,
s->gparts[k].x[0], s->gparts[k].x[1], s->gparts[k].x[2],
s->gparts[k].a_grav[0], s->gparts[k].a_grav[1],
s->gparts[k].a_grav[2]);
if (s->gparts[k].id == -1)
if (s->gparts[k].id_or_neg_offset == 1)
message("interacting mass= %f (%f)", s->gparts[k].mass_interacted,
s->gparts[k].mass_interacted + s->gparts[k].mass);
}
......@@ -2521,9 +2521,9 @@ void engine_step(struct engine *e) {
gravity_n2(temp, s->nr_gparts, e->physical_constants, rlr);
file = fopen("grav_brute.dat", "w");
for (size_t k = 0; k < s->nr_gparts; ++k) {
fprintf(file, "%lld %f %f %f %e %e %e\n", temp[k].id, temp[k].x[0],
temp[k].x[1], temp[k].x[2], temp[k].a_grav[0], temp[k].a_grav[1],
temp[k].a_grav[2]);
fprintf(file, "%lld %f %f %f %e %e %e\n", temp[k].id_or_neg_offset,
temp[k].x[0], temp[k].x[1], temp[k].x[2], temp[k].a_grav[0],
temp[k].a_grav[1], temp[k].a_grav[2]);
}
fclose(file);
......
......@@ -414,8 +414,8 @@ void runner_do_init(struct runner *r, struct cell *c, int timer) {
/* Get ready for a density calculation */
gravity_init_part(gp);
if (gp->id == -ICHECK)
message("id=%lld a=[%f %f %f]\n", gp->id, gp->a_grav[0],
if (gp->id_or_neg_offset == ICHECK)
message("id=%lld a=[%f %f %f]\n", gp->id_or_neg_offset, gp->a_grav[0],
gp->a_grav[1], gp->a_grav[2]);
}
}
......
......@@ -1427,7 +1427,8 @@ struct cell *space_getcell(struct space *s) {
* @param Npart The number of Gas particles in the space.
* @param Ngpart The number of Gravity particles in the space.
* @param periodic flag whether the domain is periodic or not.
* @param verbose Print messages to stdout or not
* @param gravity flag whether we are doing gravity or not.
* @param verbose Print messages to stdout or not.
* @param dry_run If 1, just initialise stuff, don't do anything with the parts.
*
* Makes a grid of edge length > r_max and fills the particles
......
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