From 1a9fb261531b6293d6ca554b2f9410b2607d9887 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 1 Sep 2022 11:07:44 +0200 Subject: [PATCH] Improve error message when grid dimensions are not matching --- .../RigCaseCellResultCalculator.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultCalculator.cpp b/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultCalculator.cpp index ac00907433..a88aa3dbb0 100644 --- a/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultCalculator.cpp +++ b/ApplicationLibCode/ReservoirDataModel/RigCaseCellResultCalculator.cpp @@ -74,7 +74,23 @@ bool RigCaseCellResultCalculator::computeDifference( RigEclipseCaseData* if ( !RigGridManager::isMainGridDimensionsEqual( sourceMainGrid, baseMainGrid ) ) { - RiaLogging::error( "Case difference : Grid cases do not match" ); + auto gridA_i = sourceMainGrid->cellCountI(); + auto gridA_j = sourceMainGrid->cellCountJ(); + auto gridA_k = sourceMainGrid->cellCountK(); + + auto gridB_i = baseMainGrid->cellCountI(); + auto gridB_j = baseMainGrid->cellCountJ(); + auto gridB_k = baseMainGrid->cellCountK(); + + RiaLogging::error( + QString( "Not able to compute cell value difference between two grids, as the Grid Cell Count is not " + "matching: Grid 1 IJK [%1,%2,%3] vs Grid 2 IJK [%4,%5,%6]" ) + .arg( gridA_i ) + .arg( gridA_j ) + .arg( gridA_k ) + .arg( gridB_i ) + .arg( gridB_j ) + .arg( gridB_k ) ); return false; }