yogevb / a-dda

Automatically exported from code.google.com/p/a-dda
0 stars 0 forks source link

Fatal failures of the granule generator #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Fatal failures (segmentation fault or division by zero) happens in three cases:
1) If boxZ>boxX (more precisely, gZ>gX - derived quantities inside the code).
2) If boxZ>boxY (more precisely, gZ>gY - derived quantities inside the code).
3) If granule diameter is only slightly larger than minimum particle size.

Cases (1) and (2) are due to the typos in the code (gZ is used instead gX or 
gY). If inverse conditions are satisfied (boxX>boxX, etc.) than no segmentation 
fault happens. However, the final result is expected to be OK, because the 
affected code performs preliminary checks of granule intersections. Therefore, 
if working incorrectly, it just increases load on a later code, decreasing 
overall computational efficiency (but not final accuracy). Limited tests 
support this, i.e. no previous simulations should be compromised.

Case (3) is due to imperfect distinction between algorithms for small and large 
granules. In the mentioned case, small-granule algorithms is invoked, which 
immediately fails due to division by zero. Since the condition for choosing the 
algorithm is to some extent arbitrary, it should be improved to invoke 
small-granule algorithm only when the latter is capable of running.

Original issue reported on code.google.com by yurkin on 4 Sep 2010 at 6:48

GoogleCodeExporter commented 9 years ago
Fixed by revision r959.

Original comment by yurkin on 5 Sep 2010 at 6:31

GoogleCodeExporter commented 9 years ago

Original comment by yurkin on 3 Aug 2014 at 4:58