From 2dc6711d4f8c126975d14821d93d2e5ea6a59b97 Mon Sep 17 00:00:00 2001 From: Peter Gottschling <peter.gottschling@simunova.com> Date: Tue, 18 Mar 2008 10:31:10 +0000 Subject: [PATCH] Only small magnitudes, not negative numbers filtered. --- AMDiS/src/VtkWriter.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AMDiS/src/VtkWriter.cc b/AMDiS/src/VtkWriter.cc index 9ffe4fad..d6007ee5 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; -- GitLab