From c0559fa2589d4459dda1f40f030f945611889fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 22 Aug 2014 14:02:13 +0200 Subject: [PATCH] Fix semantics of permeability assignment Calling code relies on permeability tensors being stored in column major order (row index cycling the most rapidly). Honour that requirement. The previous assignment implied row major ordering (column index cycling the most rapidly). This, however, is a pedantic rather than visible change because the surrounding code enforces symmetric tensors whence both orderings produce the same results when the array is viewed contiguously. --- opm/core/props/rock/RockFromDeck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/core/props/rock/RockFromDeck.cpp b/opm/core/props/rock/RockFromDeck.cpp index a2080bedd..6c24b3c76 100644 --- a/opm/core/props/rock/RockFromDeck.cpp +++ b/opm/core/props/rock/RockFromDeck.cpp @@ -126,7 +126,7 @@ namespace Opm for (int i = 0; i < dim; ++i) { for (int j = 0; j < dim; ++j, ++kix) { // K(i,j) = (*tensor[kmap[kix]])[glob]; - permeability_[off + kix] = (*tensor[kmap[kix]])[glob]; + permeability_[off + (i + dim*j)] = (*tensor[kmap[kix]])[glob]; } // K(i,i) = std::max(K(i,i), perm_threshold); permeability_[off + 3*i + i] = std::max(permeability_[off + 3*i + i], perm_threshold);