Commit 0259e72b authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

don't rely on there being any parts when initializing min/max counts for the cell split.


Former-commit-id: d02dcbc80c8537bbcde2040978e6c375cad366ae
parent a34560b0
...@@ -964,7 +964,7 @@ void space_map_cells_pre ( struct space *s , int full , void (*fun)( struct cell ...@@ -964,7 +964,7 @@ void space_map_cells_pre ( struct space *s , int full , void (*fun)( struct cell
void space_split ( struct space *s , struct cell *c ) { void space_split ( struct space *s , struct cell *c ) {
int k, count = c->count, gcount = c->gcount, maxdepth = 0; int k, count = c->count, gcount = c->gcount, maxdepth = 0;
float h, h_max = 0.0f, dt, dt_min = c->parts[0].dt, dt_max = dt_min; float h, h_max = 0.0f, dt, dt_min = FLT_MAX, dt_max = FLT_MIN;
struct cell *temp; struct cell *temp;
struct part *p, *parts = c->parts; struct part *p, *parts = c->parts;
struct xpart *xp, *xparts = c->xparts; struct xpart *xp, *xparts = c->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