mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2748 Completion Type Calculations : Remove unused code
This commit is contained in:
@@ -211,10 +211,10 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
||||
if (!wellPath) return;
|
||||
if (!wellPath->wellPathGeometry()) return;
|
||||
|
||||
std::set<size_t> wellPathCells = RicFishbonesTransmissibilityCalculationFeatureImp::findIntersectedCells(settings.caseToApply()->eclipseCaseData(),
|
||||
wellPath->wellPathGeometry()->m_wellPathPoints);
|
||||
bool isMainBore = false;
|
||||
std::set<size_t> wellPathCells = RigWellPathIntersectionTools::findIntersectedGlobalCellIndicesForWellPath(
|
||||
settings.caseToApply()->eclipseCaseData(), wellPath->wellPathGeometry());
|
||||
|
||||
bool isMainBore = false;
|
||||
double diameter = wellPath->fishbonesCollection()->wellPathCollection()->holeDiameter(unitSystem);
|
||||
for (const RimFishboneWellPath* fishbonesPath : wellPath->fishbonesCollection()->wellPathCollection()->wellPaths())
|
||||
{
|
||||
@@ -282,23 +282,3 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<size_t> RicFishbonesTransmissibilityCalculationFeatureImp::findIntersectedCells(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords)
|
||||
{
|
||||
std::set<size_t> cells;
|
||||
|
||||
if (!caseData)
|
||||
{
|
||||
return cells;
|
||||
}
|
||||
|
||||
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::findRawHexCellIntersections(caseData->mainGrid(), coords);
|
||||
for (auto intersection : intersections)
|
||||
{
|
||||
cells.insert(intersection.m_hexIndex);
|
||||
}
|
||||
|
||||
return cells;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,4 @@ private:
|
||||
static void findMainWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||
const RimWellPath* wellPath,
|
||||
const RicExportCompletionDataSettingsUi& settings);
|
||||
|
||||
static std::set<size_t> findIntersectedCells(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords);
|
||||
};
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
|
||||
//#include "cvfGeometryTools.h"
|
||||
//#include "cvfMatrix3.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -56,6 +54,30 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
|
||||
return extractor->cellIntersectionInfosAlongWellPath();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<size_t> RigWellPathIntersectionTools::findIntersectedGlobalCellIndicesForWellPath(const RigEclipseCaseData* caseData, const RigWellPath* wellPath)
|
||||
{
|
||||
std::set<size_t> globalCellIndices;
|
||||
|
||||
if (caseData)
|
||||
{
|
||||
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor(caseData,
|
||||
wellPath,
|
||||
caseData->ownerCase()->caseUserDescription().toStdString());
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersections = extractor->cellIntersectionInfosAlongWellPath();
|
||||
for (const auto& intersection : intersections)
|
||||
{
|
||||
globalCellIndices.insert(intersection.globCellIndex);
|
||||
}
|
||||
}
|
||||
|
||||
return globalCellIndices;
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -82,51 +104,12 @@ std::set<size_t> RigWellPathIntersectionTools::findIntersectedGlobalCellIndices(
|
||||
dummyWellPath->m_measuredDepths = helper.measuredDepths();
|
||||
}
|
||||
|
||||
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor(caseData,
|
||||
dummyWellPath.p(),
|
||||
caseData->ownerCase()->caseUserDescription().toStdString());
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersections = extractor->cellIntersectionInfosAlongWellPath();
|
||||
for (const auto& intersection : intersections)
|
||||
{
|
||||
globalCellIndices.insert(intersection.globCellIndex);
|
||||
}
|
||||
globalCellIndices = findIntersectedGlobalCellIndicesForWellPath(caseData, dummyWellPath.p());
|
||||
}
|
||||
|
||||
return globalCellIndices;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<HexIntersectionInfo> RigWellPathIntersectionTools::findRawHexCellIntersections(const RigMainGrid* grid,
|
||||
const std::vector<cvf::Vec3d>& coords)
|
||||
{
|
||||
std::vector<HexIntersectionInfo> intersections;
|
||||
for (size_t i = 0; i < coords.size() - 1; ++i)
|
||||
{
|
||||
cvf::BoundingBox bb;
|
||||
bb.add(coords[i]);
|
||||
bb.add(coords[i + 1]);
|
||||
|
||||
std::vector<size_t> closeCells = findCloseCells(grid, bb);
|
||||
|
||||
std::array<cvf::Vec3d, 8> hexCorners;
|
||||
|
||||
for (size_t closeCell : closeCells)
|
||||
{
|
||||
const RigCell& cell = grid->globalCellArray()[closeCell];
|
||||
if (cell.isInvalid()) continue;
|
||||
|
||||
grid->cellCornerVertices(closeCell, hexCorners.data());
|
||||
|
||||
RigHexIntersectionTools::lineHexCellIntersection(coords[i], coords[i + 1], hexCorners.data(), closeCell, &intersections);
|
||||
}
|
||||
}
|
||||
|
||||
return intersections;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -172,30 +155,3 @@ std::vector<size_t> RigWellPathIntersectionTools::findCloseCells(const RigMainGr
|
||||
return closeCells;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigWellPathIntersectionTools::findCellFromCoords(const RigMainGrid* grid, const cvf::Vec3d& coords, bool* foundCell)
|
||||
{
|
||||
cvf::BoundingBox bb;
|
||||
bb.add(coords);
|
||||
std::vector<size_t> closeCells = findCloseCells(grid, bb);
|
||||
std::array<cvf::Vec3d, 8> hexCorners;
|
||||
|
||||
for (size_t closeCell : closeCells)
|
||||
{
|
||||
const RigCell& cell = grid->globalCellArray()[closeCell];
|
||||
if (cell.isInvalid()) continue;
|
||||
|
||||
grid->cellCornerVertices(closeCell, hexCorners.data());
|
||||
|
||||
if (RigHexIntersectionTools::isPointInCell(coords, hexCorners.data()))
|
||||
{
|
||||
*foundCell = true;
|
||||
return closeCell;
|
||||
}
|
||||
}
|
||||
|
||||
*foundCell = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfBoundingBox.h"
|
||||
#include "cvfVector3.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
@@ -40,21 +40,22 @@ public:
|
||||
const std::vector<cvf::Vec3d>& pathCoords,
|
||||
const std::vector<double>& pathMds);
|
||||
|
||||
static std::set<size_t> findIntersectedGlobalCellIndicesForWellPath(const RigEclipseCaseData* caseData,
|
||||
const RigWellPath* wellPath);
|
||||
|
||||
static std::set<size_t> findIntersectedGlobalCellIndices(const RigEclipseCaseData* caseData,
|
||||
const std::vector<cvf::Vec3d>& coords,
|
||||
const std::vector<double>& measuredDepths = {});
|
||||
|
||||
static std::vector<HexIntersectionInfo> findRawHexCellIntersections(const RigMainGrid* grid, const std::vector<cvf::Vec3d>& coords);
|
||||
|
||||
static cvf::Vec3d calculateLengthInCell(const std::array<cvf::Vec3d, 8>& hexCorners,
|
||||
const cvf::Vec3d& startPoint,
|
||||
const cvf::Vec3d& endPoint);
|
||||
|
||||
static cvf::Vec3d calculateLengthInCell(const RigMainGrid* grid,
|
||||
size_t cellIndex,
|
||||
const cvf::Vec3d& startPoint,
|
||||
const cvf::Vec3d& endPoint);
|
||||
|
||||
private:
|
||||
static std::vector<size_t> findCloseCells(const RigMainGrid* grid, const cvf::BoundingBox& bb);
|
||||
static size_t findCellFromCoords(const RigMainGrid* caseData, const cvf::Vec3d& coords, bool* foundCell);
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user