From 492c8c74a0f9cb3d5a68992298ee069d54e4322a Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Mon, 26 Oct 2015 17:58:16 +0100 Subject: [PATCH] CartesianIndexMapper: fix computation of cartesianCoordinate. --- ewoms/common/cartesianindexmapper.hh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/ewoms/common/cartesianindexmapper.hh b/ewoms/common/cartesianindexmapper.hh index 1494b429a..a6999bde1 100644 --- a/ewoms/common/cartesianindexmapper.hh +++ b/ewoms/common/cartesianindexmapper.hh @@ -200,18 +200,23 @@ namespace Dune void cartesianCoordinate(const int compressedElementIndex, std::array& coords) const { int gc = cartesianIndex( compressedElementIndex ); - if( dimension >=2 ) + if( dimension == 3 ) { - for( int d=0; d