diff --git a/CMakeLists.txt b/CMakeLists.txt index 96dced7179d893023b4b06db05a8bf1152f8a14c..9fda9a6f626f0384078b4709770dfe1f5affd9a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -398,8 +398,8 @@ if(ENABLE_METIS) add_subdirectory(contrib/Metis) set(HAVE_METIS TRUE) list(APPEND CONFIG_OPTIONS "Metis") - message("WARNING: By including Metis you have to comply with Metis' " - "special licensing requirements stated in contrib/Metis/README.") + message("WARNING: By including Metis you have to comply with Metis' special " + "licensing requirements stated in contrib/Metis/README.txt.") endif(ENABLE_METIS) if(ENABLE_NETGEN) diff --git a/Post/PViewOptions.cpp b/Post/PViewOptions.cpp index 5641fef800ac1c0edc12cb971310fdb0c7abb0c9..245b5f58a70ab6b3fa2386122ee78a8026e44a8f 100644 --- a/Post/PViewOptions.cpp +++ b/Post/PViewOptions.cpp @@ -28,7 +28,12 @@ double PViewOptions::getScaleValue(int iso, int numIso, double min, double max) if(numIso == 1) return (min + max) / 2.; if(scaleType == Linear){ - return min + iso * (max - min) / (numIso - 1.); + // treat min/max separately to avoid numerical errors (important + // not to miss first/last discrete iso on piece-wise constant + // datasets) + if(iso == 0) return min; + else if(iso == numIso - 1) return max; + else return min + iso * (max - min) / (numIso - 1.); } else if(scaleType == Logarithmic){ // should translate scale instead, with smallest val an option!