#1625 Completion type should only use checked fractures, perforations and fishbones.

This commit is contained in:
Bjørnar Grip Fjær 2017-06-20 16:56:10 +02:00
parent 4f8f77945c
commit 18b26aaf3a

View File

@ -68,23 +68,38 @@ void RimCompletionCellIntersectionCalc::calculateWellPathIntersections(const Rim
values[intersection.m_hexIndex] = RiaDefines::WELL_PATH; values[intersection.m_hexIndex] = RiaDefines::WELL_PATH;
} }
if (wellPath->fishbonesCollection()->isChecked())
{
for (const RimFishbonesMultipleSubs* fishbones : wellPath->fishbonesCollection()->fishbonesSubs) for (const RimFishbonesMultipleSubs* fishbones : wellPath->fishbonesCollection()->fishbonesSubs)
{
if (fishbones->isChecked())
{ {
calculateFishbonesIntersections(fishbones, grid, values); calculateFishbonesIntersections(fishbones, grid, values);
} }
}
}
if (wellPath->fractureCollection()->isChecked())
{
for (const RimWellPathFracture* fracture : wellPath->fractureCollection()->fractures()) for (const RimWellPathFracture* fracture : wellPath->fractureCollection()->fractures())
{
if (fracture->isChecked())
{ {
calculateFractureIntersections(grid, fracture, values); calculateFractureIntersections(grid, fracture, values);
} }
}
}
if (wellPath->perforationIntervalCollection()->isChecked())
{
for (const RimPerforationInterval* perforationInterval : wellPath->perforationIntervalCollection()->perforations()) for (const RimPerforationInterval* perforationInterval : wellPath->perforationIntervalCollection()->perforations())
{ {
if (perforationInterval->isActiveOnDate(fromDate)) if (perforationInterval->isChecked() && perforationInterval->isActiveOnDate(fromDate))
{ {
calculatePerforationIntersections(wellPath, perforationInterval, grid, values); calculatePerforationIntersections(wellPath, perforationInterval, grid, values);
} }
} }
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -122,8 +137,12 @@ void RimCompletionCellIntersectionCalc::calculatePerforationIntersections(const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimCompletionCellIntersectionCalc::calculateFractureIntersections(const RigMainGrid* mainGrid, const RimFracture* fracture, std::vector<double>& values) void RimCompletionCellIntersectionCalc::calculateFractureIntersections(const RigMainGrid* mainGrid, const RimFracture* fracture, std::vector<double>& values)
{ {
if (!fracture->fractureTemplate()) return;
for (const RigFractureCell& fractureCell : fracture->fractureTemplate()->fractureGrid()->fractureCells()) for (const RigFractureCell& fractureCell : fracture->fractureTemplate()->fractureGrid()->fractureCells())
{ {
if (!fractureCell.hasNonZeroConductivity()) continue;
std::vector<cvf::Vec3d> fractureCellTransformed; std::vector<cvf::Vec3d> fractureCellTransformed;
for (const auto& v : fractureCell.getPolygon()) for (const auto& v : fractureCell.getPolygon())
{ {
@ -147,6 +166,8 @@ void RimCompletionCellIntersectionCalc::calculateFractureIntersections(const Rig
for (size_t cellIndex : potentialCells) for (size_t cellIndex : potentialCells)
{ {
if (!fracture->isEclipseCellWithinContainment(mainGrid, cellIndex)) continue;
std::array<cvf::Vec3d, 8> hexCorners; std::array<cvf::Vec3d, 8> hexCorners;
mainGrid->cellCornerVertices(cellIndex, hexCorners.data()); mainGrid->cellCornerVertices(cellIndex, hexCorners.data());