PlateVelocityDemo app gives NaNs for age = 0
Running the PlateVelocityDemo app I recognised that it returns NaNs for the velocities for age = 0.
Re-running with the following parameters:
Key = 'ageRange' , Value = '0 - 1000'
Key = 'feSpace' , Value = 'P1'
Key = 'jobType' , Value = 'velocities'
Key = 'level' , Value = '2'
Key = 'nRad' , Value = '2'
Key = 'nTan' , Value = '2'
showed that this appears to really only happen for this one age stage. Adding feenableexcept( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
and running the recompiled executable shows that we have a division-by-zero exception in the free-function intersectPointWithLine()
. In the latter we divide at some point by the length of the line. The latter equals zero as lineStart
and lineEnd
are the same point in this case.
While it seems pretty easy to catch this special case and return a correct result for it, the fact that this seems to occur in all computations for this age stage hints at the fact that there is either a bug or some peculiarity in the data for that stage which we fail to take care of.