From c6835bb9a7d7697ac0e351b855b662d9149503c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Wed, 2 Feb 2011 10:12:12 +0100 Subject: [PATCH] Now the relative volume discrepancy takes std::fabs(), so max_element() will be ok. --- dune/porsol/blackoil/BlackoilFluid.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dune/porsol/blackoil/BlackoilFluid.hpp b/dune/porsol/blackoil/BlackoilFluid.hpp index 9771e278..c1569f09 100644 --- a/dune/porsol/blackoil/BlackoilFluid.hpp +++ b/dune/porsol/blackoil/BlackoilFluid.hpp @@ -136,7 +136,7 @@ namespace Opm totphasevol[cell] = state.total_phase_volume_; double pv = rock.porosity(cell)*grid.cellVolume(cell); voldiscr[cell] = (totphasevol[cell] - pv)/dt; - relvoldiscr[cell] = (totphasevol[cell] - pv)/pv; + relvoldiscr[cell] = std::fabs(totphasevol[cell] - pv)/pv; saturation[cell] = state.saturation_; rel_perm[cell] = state.relperm_; viscosity[cell] = state.viscosity_;