Rebuild criteria
Instead of rebuilding whenever the cell constraints or sort indices are violated, just re-sort in case of the latter.
This lead to some other changes:
- Init tasks are gone, particle initialization is now handled in the drift tasks,
- Drift tasks no longer act on the super-cell, but exist at every level similar to the sort tasks,
- Fixed several dependency issues with sort and drift tasks,
- Only drift/sort on-demand in the sub-cell tasks.
Marked as [WIP] as this has not yet been tested for MPI runs, or with gravity.
Merge request reports
Activity
926 930 } 927 931 } 928 932 929 /* Check whether there was too much particle motion */ 933 /* Only interested in pair interactions as of here. */ 930 934 if (t->type == task_type_pair || t->type == task_type_sub_pair) { 935 936 /* Check whether there was too much particle motion, i.e. the 937 cell neighbour conditions were violated. */ 931 938 if (t->tight && 932 (max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin || 933 ci->dx_max > space_maxreldx * ci->h_max || 934 cj->dx_max > space_maxreldx * cj->h_max)) 939 max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin) 926 930 } 927 931 } 928 932 929 /* Check whether there was too much particle motion */ 933 /* Only interested in pair interactions as of here. */ 930 934 if (t->type == task_type_pair || t->type == task_type_sub_pair) { 935 936 /* Check whether there was too much particle motion, i.e. the 937 cell neighbour conditions were violated. */ 931 938 if (t->tight && 932 (max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin || 933 ci->dx_max > space_maxreldx * ci->h_max || 934 cj->dx_max > space_maxreldx * cj->h_max)) 939 max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin) In what sense too extreme? This just checks that for the two largest particles in the cell, the distance constraints are not violated.
space_stretch
just sets the minimum fraction for the sum of the maximum particle movement in both cells, i.e. the amount of elasticity to allow before this constraint is violated.Regarding
t->tight
, you're right. Can you file an issue for that?
926 930 } 927 931 } 928 932 929 /* Check whether there was too much particle motion */ 933 /* Only interested in pair interactions as of here. */ 930 934 if (t->type == task_type_pair || t->type == task_type_sub_pair) { 935 936 /* Check whether there was too much particle motion, i.e. the 937 cell neighbour conditions were violated. */ 931 938 if (t->tight && 932 (max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin || 933 ci->dx_max > space_maxreldx * ci->h_max || 934 cj->dx_max > space_maxreldx * cj->h_max)) 939 max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin) Filed #285 (closed) for the "tight" flag.
926 930 } 927 931 } 928 932 929 /* Check whether there was too much particle motion */ 933 /* Only interested in pair interactions as of here. */ 930 934 if (t->type == task_type_pair || t->type == task_type_sub_pair) { 935 936 /* Check whether there was too much particle motion, i.e. the 937 cell neighbour conditions were violated. */ 931 938 if (t->tight && 932 (max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin || 933 ci->dx_max > space_maxreldx * ci->h_max || 934 cj->dx_max > space_maxreldx * cj->h_max)) 939 max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin) 926 930 } 927 931 } 928 932 929 /* Check whether there was too much particle motion */ 933 /* Only interested in pair interactions as of here. */ 930 934 if (t->type == task_type_pair || t->type == task_type_sub_pair) { 935 936 /* Check whether there was too much particle motion, i.e. the 937 cell neighbour conditions were violated. */ 931 938 if (t->tight && 932 (max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin || 933 ci->dx_max > space_maxreldx * ci->h_max || 934 cj->dx_max > space_maxreldx * cj->h_max)) 939 max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin) 926 930 } 927 931 } 928 932 929 /* Check whether there was too much particle motion */ 933 /* Only interested in pair interactions as of here. */ 930 934 if (t->type == task_type_pair || t->type == task_type_sub_pair) { 935 936 /* Check whether there was too much particle motion, i.e. the 937 cell neighbour conditions were violated. */ 931 938 if (t->tight && 932 (max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin || 933 ci->dx_max > space_maxreldx * ci->h_max || 934 cj->dx_max > space_maxreldx * cj->h_max)) 939 max(ci->h_max, cj->h_max) + ci->dx_max + cj->dx_max > cj->dmin) Added 166 commits:
-
177b3821...bd9b222b - 165 commits from branch
master
- c3b94b9f - Merge branch 'master' into rebuild_criteria
-
177b3821...bd9b222b - 165 commits from branch
1886 1882 struct scheduler *sched, struct task *gravity, struct cell *c) { 1887 1883 1888 1884 /* init --> gravity --> grav_down --> kick */ 1889 scheduler_addunlock(sched, c->super->init, gravity); 1885 scheduler_addunlock(sched, c->ghost, gravity); 1890 1886 scheduler_addunlock(sched, gravity, c->super->grav_down); 1998 1994 struct scheduler *sched, struct task *density, struct task *gradient, 1999 1995 struct task *force, struct cell *c, int with_cooling) { 2000 1996 2001 /* init --> density loop --> ghost --> gradient loop --> extra_ghost */ 1997 /* density loop --> ghost --> gradient loop --> extra_ghost */ 2002 1998 /* extra_ghost --> force loop */ 2003 scheduler_addunlock(sched, c->super->init, density); 2004 1999 scheduler_addunlock(sched, density, c->super->ghost); mentioned in issue #280 (closed)
Added 13 commits:
-
c3b94b9f...58834a7e - 11 commits from branch
master
- c8f698a0 - Merge branch 'master' into rebuild_criteria
- 7101984c - Included latest changes from master
-
c3b94b9f...58834a7e - 11 commits from branch
Added 1 commit:
- 407d24be - Removed last occurence of the init task
Added 3 commits:
-
3693bad2...7a61b952 - 2 commits from branch
master
- 103b7aa5 - Merge branch 'master' into rebuild_criteria
-
3693bad2...7a61b952 - 2 commits from branch
@nnrw56 would you like to have this properly tested ?
@matthieu yes, that would be great! but it's probably best if i address the first round of comments first though...