From feae6e393a80c8fd63df4038da94e9fd31f7c267 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Wed, 5 Aug 2015 16:07:02 +0200 Subject: [PATCH] properly initialize the attributes of the SatHyst class this caused the hysteresis saturation shifts to be initially wrong and was probably the source of a lot of my confusion w.r.t. the saturation scaling and hysteresis shift code. I guess this also fixes a valgrind complaint, but I haven't checked... --- opm/core/props/satfunc/SatFuncBase.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/opm/core/props/satfunc/SatFuncBase.hpp b/opm/core/props/satfunc/SatFuncBase.hpp index 88b42b9b..775f527d 100644 --- a/opm/core/props/satfunc/SatFuncBase.hpp +++ b/opm/core/props/satfunc/SatFuncBase.hpp @@ -65,6 +65,14 @@ namespace Opm // Hysteresis struct SatHyst { + SatHyst() { + sg_hyst = -1.0; + sow_hyst = -1.0; + + sg_shift = 0.0; + sow_shift = 0.0; + } + double sg_hyst; double sg_shift; double sow_hyst;