|
[Sponsors] |
Rather obscure division by zero in triangleFuncsintersectAxesBundle |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 12, 2008, 08:42 |
Version: OF-1.5
Description
|
#1 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Version: OF-1.5
Description: While reading in a STL into snappyHex it crashes with a division by zero in line 142 of meshTools/triSurface/triangleFuncs/triangleFuncs.C The cause seems to be these parameters for intersectAxesBundle V0-31.71428 0 -15.10714) V10-1.285715 8.99165e-16 -1.142858) V200 0 -1.678573) i0:0 For these parameters the local variable det = 8.9e-16*1.67 > SMALL (not by much ;) ) but u1=8.99e-16<SMALL and the routine then tries to divide by u2=0 I know it is a one in a million chance that this might happen, but it happened. I propose the following patch that tightens the restriction on det (and fixes this): triangleFuncs.patch Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
August 12, 2008, 19:01 |
Thanks - I put it in. Does the
|
#2 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
Thanks - I put it in. Does the mag(u1)<SMALL need some non-dimensionalisation as well?
|
|
August 13, 2008, 08:08 |
It might be good for consisten
|
#3 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
It might be good for consistency but is in my experience not necessary.
Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
About flow division | sunnysun | OpenFOAM Running, Solving & CFD | 5 | March 2, 2009 13:34 |
Division by zero | vitke | OpenFOAM Running, Solving & CFD | 5 | September 1, 2008 06:35 |
Division by zero in Xoodles | hannes | OpenFOAM Bugs | 3 | August 4, 2008 12:04 |
ScalarField division | maka | OpenFOAM Pre-Processing | 2 | August 27, 2007 06:10 |