From 145323d8b1d40c5b39683ca5a0582299a9a8afa2 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 24 Oct 2018 11:14:15 +0200 Subject: [PATCH] #3531 Temporary LGR : Compute size dependent data for LGR --- .../ReservoirDataModel/RigCaseCellResultsData.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp index 9e400ba738..c773b50015 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -1579,38 +1579,40 @@ void RigCaseCellResultsData::computeDepthRelatedResults() { const RigCell& cell = m_ownerMainGrid->globalCellArray()[cellIdx]; - if (computeDepth) + bool isTemporaryGrid = cell.hostGrid()->isTempGrid(); + + if (computeDepth || isTemporaryGrid) { depth[0][cellIdx] = cvf::Math::abs(cell.center().z()); } - if (computeDx) + if (computeDx || isTemporaryGrid) { cvf::Vec3d cellWidth = cell.faceCenter(cvf::StructGridInterface::NEG_I) - cell.faceCenter(cvf::StructGridInterface::POS_I); dx[0][cellIdx] = cellWidth.length(); } - if (computeDy) + if (computeDy || isTemporaryGrid) { cvf::Vec3d cellWidth = cell.faceCenter(cvf::StructGridInterface::NEG_J) - cell.faceCenter(cvf::StructGridInterface::POS_J); dy[0][cellIdx] = cellWidth.length(); } - if (computeDz) + if (computeDz || isTemporaryGrid) { cvf::Vec3d cellWidth = cell.faceCenter(cvf::StructGridInterface::NEG_K) - cell.faceCenter(cvf::StructGridInterface::POS_K); dz[0][cellIdx] = cellWidth.length(); } - if (computeTops) + if (computeTops || isTemporaryGrid) { tops[0][cellIdx] = cvf::Math::abs(cell.faceCenter(cvf::StructGridInterface::NEG_K).z()); } - if (computeBottom) + if (computeBottom || isTemporaryGrid) { bottom[0][cellIdx] = cvf::Math::abs(cell.faceCenter(cvf::StructGridInterface::POS_K).z()); }