Adapt to removal of GridProperty::iget()

This commit is contained in:
Joakim Hove 2019-09-28 09:20:17 +02:00
parent 4ddb8e8d56
commit 1d9a3e3d35
2 changed files with 11 additions and 9 deletions

View File

@ -502,6 +502,9 @@ private:
const auto& inputTranx = properties.getDoubleGridProperty("TRANX"); const auto& inputTranx = properties.getDoubleGridProperty("TRANX");
const auto& inputTrany = properties.getDoubleGridProperty("TRANY"); const auto& inputTrany = properties.getDoubleGridProperty("TRANY");
const auto& inputTranz = properties.getDoubleGridProperty("TRANZ"); const auto& inputTranz = properties.getDoubleGridProperty("TRANZ");
const auto& inputTranxData = properties.getDoubleGridProperty("TRANX").getData();
const auto& inputTranyData = properties.getDoubleGridProperty("TRANY").getData();
const auto& inputTranzData = properties.getDoubleGridProperty("TRANZ").getData();
// compute the transmissibilities for all intersections // compute the transmissibilities for all intersections
auto elemIt = gridView.template begin</*codim=*/ 0>(); auto elemIt = gridView.template begin</*codim=*/ 0>();
@ -531,26 +534,26 @@ private:
if (gc2 - gc1 == 1) { if (gc2 - gc1 == 1) {
if (inputTranx.deckAssigned()) if (inputTranx.deckAssigned())
// set simulator internal transmissibilities to values from inputTranx // set simulator internal transmissibilities to values from inputTranx
trans_[isId] = inputTranx.iget(gc1); trans_[isId] = inputTranxData[gc1];
else else
// Scale transmissibilities with scale factor from inputTranx // Scale transmissibilities with scale factor from inputTranx
trans_[isId] *= inputTranx.iget(gc1); trans_[isId] *= inputTranxData[gc1];
} }
else if (gc2 - gc1 == cartDims[0]) { else if (gc2 - gc1 == cartDims[0]) {
if (inputTrany.deckAssigned()) if (inputTrany.deckAssigned())
// set simulator internal transmissibilities to values from inputTrany // set simulator internal transmissibilities to values from inputTrany
trans_[isId] = inputTrany.iget(gc1); trans_[isId] = inputTranyData[gc1];
else else
// Scale transmissibilities with scale factor from inputTrany // Scale transmissibilities with scale factor from inputTrany
trans_[isId] *= inputTrany.iget(gc1); trans_[isId] *= inputTranyData[gc1];
} }
else if (gc2 - gc1 == cartDims[0]*cartDims[1]) { else if (gc2 - gc1 == cartDims[0]*cartDims[1]) {
if (inputTranz.deckAssigned()) if (inputTranz.deckAssigned())
// set simulator internal transmissibilities to values from inputTranz // set simulator internal transmissibilities to values from inputTranz
trans_[isId] = inputTranz.iget(gc1); trans_[isId] = inputTranzData[gc1];
else else
// Scale transmissibilities with scale factor from inputTranz // Scale transmissibilities with scale factor from inputTranz
trans_[isId] *= inputTranz.iget(gc1); trans_[isId] *= inputTranzData[gc1];
} }
//else.. We don't support modification of NNC at the moment. //else.. We don't support modification of NNC at the moment.
} }

View File

@ -56,12 +56,11 @@ namespace Opm {
scaledEpsInfo_.resize(nc); scaledEpsInfo_.resize(nc);
EclEpsGridProperties epsGridProperties; EclEpsGridProperties epsGridProperties;
epsGridProperties.initFromDeck(deck, eclState, /*imbibition=*/false); epsGridProperties.initFromDeck(deck, eclState, /*imbibition=*/false);
const auto& satnum = eclState.get3DProperties().getIntGridProperty("SATNUM"); const auto& satnumData = eclState.get3DProperties().getIntGridProperty("SATNUM").getData();
const std::string tag = "Scaled endpoints"; const std::string tag = "Scaled endpoints";
for (int c = 0; c < nc; ++c) { for (int c = 0; c < nc; ++c) {
const int cartIdx = compressedToCartesianIdx[c]; const int cartIdx = compressedToCartesianIdx[c];
const std::string satnumIdx = std::to_string(satnum.iget(cartIdx)); const std::string satnumIdx = std::to_string(satnumData[cartIdx]);
std::array<int, 3> ijk; std::array<int, 3> ijk;
ijk[0] = cartIdx % dims[0]; ijk[0] = cartIdx % dims[0];
ijk[1] = (cartIdx / dims[0]) % dims[1]; ijk[1] = (cartIdx / dims[0]) % dims[1];