diff --git a/AMDiS/src/VtkWriter.cc b/AMDiS/src/VtkWriter.cc index 9ffe4fadb52210ebcae013a957f25721675e79fe..d6007ee56c00381c640442e807b0715a291c738c 100644 --- a/AMDiS/src/VtkWriter.cc +++ b/AMDiS/src/VtkWriter.cc @@ -1,6 +1,7 @@ #include <stdio.h> #include <string> #include <fstream> +#include <cstdlib> #include "VtkWriter.h" #include "DataCollector.h" @@ -112,7 +113,7 @@ namespace AMDiS { { if (*intPointIt == -2) { for (int j = 0; j < static_cast<int>(coordIt->size()); j++) { - if (*valueIt < 1e-40) { + if (std::abs(*valueIt) < 1e-40) { file << " " << 0.0 << ::std::endl; } else { file << " " << *valueIt << ::std::endl;