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

Merge branch 'master' of gitlab.cosma.dur.ac.uk:swift/swiftsim

parents 38b83e2e ba9fe05e
No related branches found
No related tags found
No related merge requests found
...@@ -393,7 +393,7 @@ void dumpCells(const char *prefix, int active, int mpiactive, int pactive, ...@@ -393,7 +393,7 @@ void dumpCells(const char *prefix, int active, int mpiactive, int pactive,
fclose(file); fclose(file);
} }
#ifdef HAVE_METIS #if defined(WITH_MPI) && defined(HAVE_METIS)
/** /**
* @brief Dump the METIS graph in standard format, simple format and weights * @brief Dump the METIS graph in standard format, simple format and weights
......
...@@ -39,7 +39,7 @@ int checkCellhdxmax(const struct cell *c, int *depth); ...@@ -39,7 +39,7 @@ int checkCellhdxmax(const struct cell *c, int *depth);
void dumpCells(const char *prefix, int active, int mpiactive, int pactive, void dumpCells(const char *prefix, int active, int mpiactive, int pactive,
struct space *s, int rank, int step); struct space *s, int rank, int step);
#ifdef HAVE_METIS #if defined(WITH_MPI) && defined(HAVE_METIS)
#include "metis.h" #include "metis.h"
void dumpMETISGraph(const char *prefix, idx_t nvtxs, idx_t ncon, idx_t *xadj, void dumpMETISGraph(const char *prefix, idx_t nvtxs, idx_t ncon, idx_t *xadj,
idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt); idx_t *adjncy, idx_t *vwgt, idx_t *vsize, idx_t *adjwgt);
......
...@@ -1001,6 +1001,21 @@ void runner_do_kick1(struct runner *r, struct cell *c, int timer) { ...@@ -1001,6 +1001,21 @@ void runner_do_kick1(struct runner *r, struct cell *c, int timer) {
/* do the kick */ /* do the kick */
kick_part(p, xp, ti_begin, ti_begin + ti_step / 2, timeBase); kick_part(p, xp, ti_begin, ti_begin + ti_step / 2, timeBase);
/* Update the accelerations to be used in the drift for hydro */
if (p->gpart != NULL) {
const float a_tot[3] = {p->a_hydro[0] + p->gpart->a_grav[0],
p->a_hydro[1] + p->gpart->a_grav[1],
p->a_hydro[2] + p->gpart->a_grav[2]};
p->a_hydro[0] = a_tot[0];
p->a_hydro[1] = a_tot[1];
p->a_hydro[2] = a_tot[2];
p->gpart->a_grav[0] = a_tot[0];
p->gpart->a_grav[1] = a_tot[1];
p->gpart->a_grav[2] = a_tot[2];
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment