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) return;
|
||||||
if (!wellPath->wellPathGeometry()) return;
|
if (!wellPath->wellPathGeometry()) return;
|
||||||
|
|
||||||
std::set<size_t> wellPathCells = RicFishbonesTransmissibilityCalculationFeatureImp::findIntersectedCells(settings.caseToApply()->eclipseCaseData(),
|
std::set<size_t> wellPathCells = RigWellPathIntersectionTools::findIntersectedGlobalCellIndicesForWellPath(
|
||||||
wellPath->wellPathGeometry()->m_wellPathPoints);
|
settings.caseToApply()->eclipseCaseData(), wellPath->wellPathGeometry());
|
||||||
bool isMainBore = false;
|
|
||||||
|
|
||||||
|
bool isMainBore = false;
|
||||||
double diameter = wellPath->fishbonesCollection()->wellPathCollection()->holeDiameter(unitSystem);
|
double diameter = wellPath->fishbonesCollection()->wellPathCollection()->holeDiameter(unitSystem);
|
||||||
for (const RimFishboneWellPath* fishbonesPath : wellPath->fishbonesCollection()->wellPathCollection()->wellPaths())
|
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,
|
static void findMainWellBoreParts(std::map<size_t, std::vector<WellBorePartForTransCalc>>& wellBorePartsInCells,
|
||||||
const RimWellPath* wellPath,
|
const RimWellPath* wellPath,
|
||||||
const RicExportCompletionDataSettingsUi& settings);
|
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 "RimEclipseCase.h"
|
||||||
|
|
||||||
//#include "cvfGeometryTools.h"
|
|
||||||
//#include "cvfMatrix3.h"
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@@ -56,6 +54,30 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
|
|||||||
return extractor->cellIntersectionInfosAlongWellPath();
|
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();
|
dummyWellPath->m_measuredDepths = helper.measuredDepths();
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<RigEclipseWellLogExtractor> extractor = new RigEclipseWellLogExtractor(caseData,
|
globalCellIndices = findIntersectedGlobalCellIndicesForWellPath(caseData, dummyWellPath.p());
|
||||||
dummyWellPath.p(),
|
|
||||||
caseData->ownerCase()->caseUserDescription().toStdString());
|
|
||||||
|
|
||||||
std::vector<WellPathCellIntersectionInfo> intersections = extractor->cellIntersectionInfosAlongWellPath();
|
|
||||||
for (const auto& intersection : intersections)
|
|
||||||
{
|
|
||||||
globalCellIndices.insert(intersection.globCellIndex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return globalCellIndices;
|
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;
|
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
|
#pragma once
|
||||||
|
|
||||||
#include "cvfBase.h"
|
#include "cvfBase.h"
|
||||||
#include "cvfVector3.h"
|
|
||||||
#include "cvfBoundingBox.h"
|
#include "cvfBoundingBox.h"
|
||||||
|
#include "cvfVector3.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
@@ -36,25 +36,26 @@ struct WellPathCellIntersectionInfo;
|
|||||||
class RigWellPathIntersectionTools
|
class RigWellPathIntersectionTools
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static std::vector<WellPathCellIntersectionInfo> findCellIntersectionInfosAlongPath(const RigEclipseCaseData* caseData,
|
static std::vector<WellPathCellIntersectionInfo> findCellIntersectionInfosAlongPath(const RigEclipseCaseData* caseData,
|
||||||
const std::vector<cvf::Vec3d>& pathCoords,
|
const std::vector<cvf::Vec3d>& pathCoords,
|
||||||
const std::vector<double>& pathMds);
|
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,
|
static std::set<size_t> findIntersectedGlobalCellIndices(const RigEclipseCaseData* caseData,
|
||||||
const std::vector<cvf::Vec3d>& coords,
|
const std::vector<cvf::Vec3d>& coords,
|
||||||
const std::vector<double>& measuredDepths = {});
|
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 std::array<cvf::Vec3d, 8>& hexCorners,
|
static cvf::Vec3d calculateLengthInCell(const RigMainGrid* grid,
|
||||||
const cvf::Vec3d& startPoint,
|
size_t cellIndex,
|
||||||
const cvf::Vec3d& endPoint);
|
const cvf::Vec3d& startPoint,
|
||||||
static cvf::Vec3d calculateLengthInCell(const RigMainGrid* grid,
|
const cvf::Vec3d& endPoint);
|
||||||
size_t cellIndex,
|
|
||||||
const cvf::Vec3d& startPoint,
|
|
||||||
const cvf::Vec3d& endPoint);
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
static std::vector<size_t> findCloseCells(const RigMainGrid* grid, const cvf::BoundingBox& bb);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user