Skip to content
Snippets Groups Projects
Commit 9b82cfd1 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'particle_init' into 'master'

Initialise the entropy only once.

Exactly what is says on the tin. 


See merge request !148
parents 254cc1b5 80de9a1b
No related branches found
No related tags found
1 merge request!148Initialise the entropy only once.
......@@ -1042,7 +1042,7 @@ void engine_exchange_strays(struct engine *e, size_t offset_parts,
count_gparts += p->nr_gparts_in;
}
}
/* Wait for all the sends to have finished too. */
if (nr_out > 0)
if (MPI_Waitall(3 * e->nr_proxies, reqs_out, MPI_STATUSES_IGNORE) !=
......@@ -1953,7 +1953,7 @@ void engine_init_particles(struct engine *e) {
TIMER_TOC(timer_runners);
/* Apply some conversions (e.g. internal energy -> entropy) */
space_map_cells_pre(s, 1, cell_convert_hydro, NULL);
space_map_cells_pre(s, 0, cell_convert_hydro, NULL);
/* Ready to go */
e->step = -1;
......
......@@ -475,15 +475,11 @@ void space_rebuild(struct space *s, double cell_max, int verbose) {
/* Exchange the strays, note that this potentially re-allocates
the parts arrays. */
/* TODO: This function also exchanges gparts, but this is shorted-out
until they are fully implemented. */
size_t nr_parts_exchanged = s->nr_parts - nr_parts;
size_t nr_gparts_exchanged = s->nr_gparts - nr_gparts;
engine_exchange_strays(s->e, nr_parts, &ind[nr_parts], &nr_parts_exchanged,
nr_gparts, &gind[nr_gparts], &nr_gparts_exchanged);
/* Add post-processing, i.e. re-linking/creating of gparts here. */
/* Set the new particle counts. */
s->nr_parts = nr_parts + nr_parts_exchanged;
s->nr_gparts = nr_gparts + nr_gparts_exchanged;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment