• Steffen Müthing's avatar
    [!350] Truncate denormalized floating point values to 0 when writing ASCII · d91ccd8c
    Steffen Müthing authored
    Merge branch 'bug/do-not-crash-paraview-on-macos' into 'master'
    
    ref:core/dune-grid Paraview (well, probably VTK) on macOS crashes when reading
    ASCII files with denormalized float values. This seems to be due to libc++'s
    IO stream implementation, which sets the fail bit when reading a denormalized
    value. On top of that, Paraview just segfaults when encountering a fail bit
    while loading VTK files.
    
    libstdc++ does not set the failt bit, and I don't know what is the correct
    behavior, but having Paraview mysteriously crash on DUNE output files is not
    good.
    
    So this patch truncates subnormal floating point values to 0 when writing
    ASCII. This should not seriously influence any visualization results, but it
    might trip up people who use exact floating point comparisons for tests (but
    then you shouldn't do that anyway\...).
    
    See merge request [!350]
    
      [!350]: gitlab.dune-project.org/core/dune-grid/merge_requests/350
    d91ccd8c
Name
Last commit
Last update
cmake/modules Loading commit data...
doc Loading commit data...
dune Loading commit data...
lib Loading commit data...
src Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
CHANGELOG.md Loading commit data...
CMakeLists.txt Loading commit data...
COPYING Loading commit data...
INSTALL Loading commit data...
LICENSE.md Loading commit data...
README.md Loading commit data...
config.h.cmake Loading commit data...
dune-grid.pc.in Loading commit data...
dune.module Loading commit data...