From 69240fe4354e42e817b4710fb7a5b5557f072635 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 29 Nov 2016 13:22:19 +0100 Subject: [PATCH] StandardWellsDense: fix two assertations the compiler suggested braces around the conditions, and by look of it, it was right: these asserts most likely want express that only the threephase case or the twophase case without gas are handled... --- opm/autodiff/StandardWellsDense.hpp | 2 +- opm/autodiff/WellStateFullyImplicitBlackoilDense.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/autodiff/StandardWellsDense.hpp b/opm/autodiff/StandardWellsDense.hpp index 6a1b4ae5b..0bebb8de6 100644 --- a/opm/autodiff/StandardWellsDense.hpp +++ b/opm/autodiff/StandardWellsDense.hpp @@ -135,7 +135,7 @@ enum WellVariablePositions { // assumes the gas fractions are stored after water fractions // WellVariablePositions needs to be changed for 2p runs - assert (np == 3 || np == 2 && !pu.phase_used[Gas] ); + assert (np == 3 || (np == 2 && !pu.phase_used[Gas]) ); #endif // set invDuneD diff --git a/opm/autodiff/WellStateFullyImplicitBlackoilDense.hpp b/opm/autodiff/WellStateFullyImplicitBlackoilDense.hpp index 0718ac931..6f041f6b6 100644 --- a/opm/autodiff/WellStateFullyImplicitBlackoilDense.hpp +++ b/opm/autodiff/WellStateFullyImplicitBlackoilDense.hpp @@ -124,7 +124,7 @@ namespace Opm const int waterpos = pu.phase_pos[Water]; const int gaspos = pu.phase_pos[Gas]; - assert (np == 3 || np == 2 && !pu.phase_used[Gas] ); + assert(np == 3 || (np == 2 && !pu.phase_used[Gas])); // assumes the gas fractions are stored after water fractions if(std::abs(total_rates) > 0) { if( pu.phase_used[Water] ) {