From 8909d471e8a36af04c8ac774eea872adc0e84add Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 28 Jan 2020 14:06:40 +0100 Subject: [PATCH] disable assert this triggers while running a thermal deck (SPE1CASE2_THERMAL), but there is no apparent reason why it is an error. --- opm/material/common/Tabulated1DFunction.hpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/opm/material/common/Tabulated1DFunction.hpp b/opm/material/common/Tabulated1DFunction.hpp index f49664c11..b2fa517e0 100644 --- a/opm/material/common/Tabulated1DFunction.hpp +++ b/opm/material/common/Tabulated1DFunction.hpp @@ -129,16 +129,17 @@ public: bool sortInputs = true) { assert(x.size() == y.size()); - assert(x.size() > 1); resizeArrays_(x.size()); - std::copy(x.begin(), x.end(), xValues_.begin()); - std::copy(y.begin(), y.end(), yValues_.begin()); + if (x.size() > 0) { + std::copy(x.begin(), x.end(), xValues_.begin()); + std::copy(y.begin(), y.end(), yValues_.begin()); - if (sortInputs) - sortInput_(); - else if (xValues_[0] > xValues_[numSamples() - 1]) - reverseSamplingPoints_(); + if (sortInputs) + sortInput_(); + else if (xValues_[0] > xValues_[numSamples() - 1]) + reverseSamplingPoints_(); + } } /*!