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

Limit the depth of the gravity tasks being split.

parent 5ad98d9d
Branches
Tags
1 merge request!576Gravity splittask (non-MPI)
......@@ -607,7 +607,7 @@ __attribute__((always_inline)) INLINE static int cell_can_split_pair_gravity_tas
const struct cell *c) {
/* Is the cell split ? */
return c->split;
return c->split && c->depth < space_subdepth_grav;
}
/**
......@@ -620,7 +620,7 @@ __attribute__((always_inline)) INLINE static int cell_can_split_self_gravity_tas
const struct cell *c) {
/* Is the cell split ? */
return c->split;
return c->split && c->depth < space_subdepth_grav;
}
/**
......
......@@ -66,6 +66,7 @@ int space_subsize_pair_hydro = space_subsize_pair_hydro_default;
int space_subsize_self_hydro = space_subsize_self_hydro_default;
int space_subsize_pair_grav = space_subsize_pair_grav_default;
int space_subsize_self_grav = space_subsize_self_grav_default;
int space_subdepth_grav = space_subdepth_grav_default;
int space_maxsize = space_maxsize_default;
#ifdef SWIFT_DEBUG_CHECKS
int last_cell_id;
......
......@@ -48,6 +48,7 @@ struct cosmology;
#define space_subsize_self_hydro_default 32000
#define space_subsize_pair_grav_default 256000000
#define space_subsize_self_grav_default 32000
#define space_subdepth_grav_default 2
#define space_max_top_level_cells_default 12
#define space_stretch 1.10f
#define space_maxreldx 0.1f
......@@ -62,6 +63,7 @@ extern int space_subsize_pair_hydro;
extern int space_subsize_self_hydro;
extern int space_subsize_pair_grav;
extern int space_subsize_self_grav;
extern int space_subdepth_grav;
/**
* @brief The space in which the cells and particles reside.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment