Skip to content

single precision reading does not handle 1e-39 or lower

in v1706 this does work - it underflows and truncates to 0.

This is used when generating meshes in double precision but then running with single precision.

Replicate: change on e.g. cavity one of the points in constant/polyMesh/points to

(0.01 1e-39 0)

and run e.g. checkMesh. Will produce error

--> FOAM FATAL IO ERROR:                                                                                                                                                                                                                                                      
Attempt to get back from bad stream                                                                                                                                                                                                                                           

file: /home/preston2/mattijs/OpenFOAM/OpenFOAM-plus.develop/tutorials/incompressible/icoFoam/cavity/cavity/constant/polyMesh/points at line 23.                                                                                                                               

    From function bool Foam::Istream::getBack(Foam::token&)                                                                                                                                                                                                                   
    in file db/IOstreams/IOstreams/Istream.C at line 56.                                                                                                                                                                                                                      

FOAM aborting (FOAM_ABORT set)