mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2673 from blattms/fix-tranyxyz-sub-3D
[bugfix] Fix TRANXYZ for problems with less than 3 dimensions. Also subsumes and closes #2150.
This commit is contained in:
commit
0310fa4edf
@ -530,7 +530,7 @@ private:
|
||||
int gc1 = std::min(cartMapper.cartesianIndex(c1), cartMapper.cartesianIndex(c2));
|
||||
int gc2 = std::max(cartMapper.cartesianIndex(c1), cartMapper.cartesianIndex(c2));
|
||||
|
||||
if (gc2 - gc1 == 1) {
|
||||
if (gc2 - gc1 == 1 && cartDims[0] > 1) {
|
||||
if (tranx_deckAssigned)
|
||||
// set simulator internal transmissibilities to values from inputTranx
|
||||
trans_[isId] = inputTranxData[c1];
|
||||
@ -538,7 +538,7 @@ private:
|
||||
// Scale transmissibilities with scale factor from inputTranx
|
||||
trans_[isId] *= inputTranxData[c1];
|
||||
}
|
||||
else if (gc2 - gc1 == cartDims[0]) {
|
||||
else if (gc2 - gc1 == cartDims[0] && cartDims[1] > 1) {
|
||||
if (trany_deckAssigned)
|
||||
// set simulator internal transmissibilities to values from inputTrany
|
||||
trans_[isId] = inputTranyData[c1];
|
||||
|
@ -552,12 +552,12 @@ private:
|
||||
int gc1 = std::min(cartIdx1, cartIdx2);
|
||||
int gc2 = std::max(cartIdx1, cartIdx2);
|
||||
|
||||
if (gc2 - gc1 == 1) {
|
||||
if (gc2 - gc1 == 1 && cartDims[0] > 1 ) {
|
||||
tranx.data[gc1] = globalTrans->transmissibility(c1, c2);
|
||||
continue; // skip other if clauses as they are false, last one needs some computation
|
||||
}
|
||||
|
||||
if (gc2 - gc1 == cartDims[0]) {
|
||||
if (gc2 - gc1 == cartDims[0] && cartDims[1] > 1) {
|
||||
trany.data[gc1] = globalTrans->transmissibility(c1, c2);
|
||||
continue; // skipt next if clause as it needs some computation
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user