mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix crash due to global/local grid index mixup when creating fractures on SimWellPaths.
* Introduces a convenience method on the main grid * Also converts some callers to use the convenience method.
This commit is contained in:
@@ -853,11 +853,8 @@ void RiuViewerCommands::findCellAndGridIndex(const RivIntersectionSourceInfo* cr
|
||||
crossSectionSourceInfo->crossSection()->firstAncestorOrThisOfType(eclipseView);
|
||||
|
||||
size_t globalCellIndex = crossSectionSourceInfo->triangleToCellIndex()[firstPartTriangleIndex];
|
||||
|
||||
const RigCell& cell = eclipseView->mainGrid()->globalCellArray()[globalCellIndex];
|
||||
|
||||
*cellIndex = cell.gridLocalCellIndex();
|
||||
*gridIndex = cell.hostGrid()->gridIndex();
|
||||
const RigGridBase* hostGrid = eclipseView->mainGrid()->gridAndGridLocalIdxFromGlobalCellIdx(globalCellIndex, cellIndex);
|
||||
*gridIndex = hostGrid->gridIndex();
|
||||
}
|
||||
else if (geomCase)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user