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:
@@ -33,12 +33,11 @@ RigCompletionDataGridCell::RigCompletionDataGridCell(size_t globalCellIndex, con
|
||||
{
|
||||
if (mainGrid)
|
||||
{
|
||||
const RigCell& cell = mainGrid->globalCellArray()[globalCellIndex];
|
||||
RigGridBase* grid = cell.hostGrid();
|
||||
size_t gridLocalCellIndex;
|
||||
const RigGridBase* grid = mainGrid->gridAndGridLocalIdxFromGlobalCellIdx(globalCellIndex, &gridLocalCellIndex);
|
||||
|
||||
if (grid)
|
||||
{
|
||||
size_t gridLocalCellIndex = cell.gridLocalCellIndex();
|
||||
|
||||
size_t i = 0;
|
||||
size_t j = 0;
|
||||
size_t k = 0;
|
||||
|
||||
Reference in New Issue
Block a user