Commit ad63d716 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

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

parents d5e85e12 c5a5c663
......@@ -1044,7 +1044,6 @@ static int check_complete(struct space *s, int verbose, int nregions) {
return (!failed);
}
/**
* @brief Partition a space of cells based on another space of cells.
*
......@@ -1062,7 +1061,8 @@ static int check_complete(struct space *s, int verbose, int nregions) {
*
* @param oldh the cell dimensions of old space.
* @param oldcdim number of cells per dimension in old space.
* @param oldnodeIDs the nodeIDs of cells in the old space, indexed by old cellid.
* @param oldnodeIDs the nodeIDs of cells in the old space, indexed by old
*cellid.
* @param s the space to be partitioned.
*
* @return 1 if the new space contains nodeIDs from all nodes, 0 otherwise.
......
......@@ -103,7 +103,8 @@ void phys_const_init(struct UnitSystem* us, struct phys_const* internal_const) {
void phys_const_print(struct phys_const* internal_const) {
message("%25s = %e", "Gravitational constant", internal_const->const_newton_G);
message("%25s = %e", "Gravitational constant",
internal_const->const_newton_G);
message("%25s = %e", "Speed of light", internal_const->const_speed_light_c);
message("%25s = %e", "Planck constant", internal_const->const_planck_h);
message("%25s = %e", "Boltzmann constant", internal_const->const_boltzmann_k);
......
......@@ -205,7 +205,7 @@ void space_regrid(struct space *s, double cell_max, int verbose) {
"Must have at least 3 cells in each spatial dimension when periodicity "
"is switched on.");
/* In MPI-Land, changing the top-level cell size requires that the
/* In MPI-Land, changing the top-level cell size requires that the
* global partition is recomputed and the particles redistributed.
* Be prepared to do that. */
#ifdef WITH_MPI
......@@ -301,10 +301,11 @@ void space_regrid(struct space *s, double cell_max, int verbose) {
* cells around the nodes. We repartition using the old space node
* positions as a grid to resample. */
if (s->e->nodeID == 0)
message("basic cell dimensions have increased - recalculating the "
message(
"basic cell dimensions have increased - recalculating the "
"global partition.");
if (!partition_space_to_space(oldh, oldcdim, oldnodeIDs, s) ) {
if (!partition_space_to_space(oldh, oldcdim, oldnodeIDs, s)) {
/* Failed, try another technique that requires no settings. */
message("Failed to get a new partition, trying less optimal method");
......@@ -1407,7 +1408,7 @@ void space_init(struct space *s, const struct swift_params *params,
space_maxsize = parser_get_param_int(params, "Scheduler:cell_max_size");
space_subsize = parser_get_param_int(params, "Scheduler:cell_sub_size");
space_splitsize = parser_get_param_int(params, "Scheduler:cell_split_size");
if(verbose)
if (verbose)
message("max_size set to %d, sub_size set to %d, split_size set to %d",
space_maxsize, space_subsize, space_splitsize);
......@@ -1478,7 +1479,7 @@ void space_init(struct space *s, const struct swift_params *params,
}
/* Allocate the extra parts array. */
if(Npart > 0) {
if (Npart > 0) {
if (posix_memalign((void *)&s->xparts, xpart_align,
Npart * sizeof(struct xpart)) != 0)
error("Failed to allocate xparts.");
......
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