diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2011-01-16 13:44:42 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:25:55 +0000 |
commit | 38f5ec152c968e90a472c23ffc1cf4b09aa6b161 (patch) | |
tree | a75db9a5109da4874e5e8186910f039e05a062a4 /Carpet/LoopControl | |
parent | d3698a6c11469f96ffdd4ed41335f3d55b604b49 (diff) |
LoopControl: Ensure there is at least one possible tiling
Ensure there is at least one possible tiling, creating a fake tiling
if there are zero grid points.
Diffstat (limited to 'Carpet/LoopControl')
-rw-r--r-- | Carpet/LoopControl/src/loopcontrol.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Carpet/LoopControl/src/loopcontrol.c b/Carpet/LoopControl/src/loopcontrol.c index 9094c12a2..a443c60b5 100644 --- a/Carpet/LoopControl/src/loopcontrol.c +++ b/Carpet/LoopControl/src/loopcontrol.c @@ -189,6 +189,12 @@ find_tiling_specifications (lc_tiling_t * restrict const tilings, /* Sort */ qsort (tilings, * ntilings, sizeof * tilings, tiling_compare); + /* step size should be at least 1, even if there are only 0 + points */ + assert (* ntilings < maxntilings); + tilings[* ntilings].npoints = lc_max (npoints, 1); + ++ * ntilings; + assert (* ntilings >= 1); } |