#2176 Fix the crash due to an invalid wellhead definition from libecl. Now using first valid connection-cell as proxywellhead in calculations if needed.

This commit is contained in:
Jacob Støren
2017-11-24 12:41:24 +01:00
parent 007fc87283
commit cf9f886856
4 changed files with 63 additions and 18 deletions

View File

@@ -192,10 +192,10 @@ void RimSimWellInView::wellHeadTopBottomPosition(size_t frameIndex, cvf::Vec3d*
RigEclipseCaseData* rigReservoir = m_rimReservoirView->eclipseCase()->eclipseCaseData();
if (!this->simWellData()->hasWellResult(frameIndex)) return;
if ( !this->simWellData()->hasAnyValidCells(frameIndex) ) return;
const RigWellResultFrame& wellResultFrame = this->simWellData()->wellResultFrame(frameIndex);
const RigCell& whCell = rigReservoir->cellFromWellResultCell(wellResultFrame.m_wellHead);
const RigCell& whCell = rigReservoir->cellFromWellResultCell(wellResultFrame.wellHeadOrStartCell());
// Match this position with pipe start position in RivWellPipesPartMgr::calculateWellPipeCenterline()