mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6072 Well Completions : Make sure valves are included if they are located outside grid cells
This commit is contained in:
@@ -1110,9 +1110,13 @@ std::vector<SubSegmentIntersectionInfo>
|
||||
const std::vector<double>& mds = wellPathGeometry->measureDepths();
|
||||
CVF_ASSERT( !coords.empty() && !mds.empty() );
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersections =
|
||||
std::vector<WellPathCellIntersectionInfo> intersectionsA =
|
||||
RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath( eclipseCase->eclipseCaseData(), coords, mds );
|
||||
|
||||
const RigMainGrid* mainGrid = eclipseCase->mainGrid();
|
||||
std::vector<WellPathCellIntersectionInfo> intersections =
|
||||
RigWellPathIntersectionTools::buildContinuousIntersections( intersectionsA, mainGrid );
|
||||
|
||||
if ( wellPath->perforationIntervalCollection()->mswParameters()->referenceMDType() ==
|
||||
RimMswCompletionParameters::MANUAL_REFERENCE_MD )
|
||||
{
|
||||
@@ -1221,11 +1225,19 @@ std::vector<WellPathCellIntersectionInfo>
|
||||
|
||||
const RigMainGrid* grid = eclipseCase->mainGrid();
|
||||
|
||||
extraIntersection.intersectionLengthsInCellCS =
|
||||
RigWellPathIntersectionTools::calculateLengthInCell( grid,
|
||||
intersection.globCellIndex,
|
||||
intersectionPoint,
|
||||
intersection.endPoint );
|
||||
if ( intersection.globCellIndex < grid->cellCount() )
|
||||
{
|
||||
extraIntersection.intersectionLengthsInCellCS =
|
||||
RigWellPathIntersectionTools::calculateLengthInCell( grid,
|
||||
intersection.globCellIndex,
|
||||
intersectionPoint,
|
||||
intersection.endPoint );
|
||||
}
|
||||
else
|
||||
{
|
||||
extraIntersection.intersectionLengthsInCellCS = cvf::Vec3d::ZERO;
|
||||
}
|
||||
|
||||
filteredIntersections.push_back( extraIntersection );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user