mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1858 General refactoring as preparations. Renaming Whitespace change. Remove obsolete code.
This commit is contained in:
@@ -176,19 +176,19 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
|
||||
const RicExportCompletionDataSettingsUi& settings)
|
||||
{
|
||||
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
|
||||
std::vector<size_t> wellPathCells = RicWellPathExportCompletionDataFeature::findIntersectingCells(settings.caseToApply()->eclipseCaseData(),
|
||||
wellPath->wellPathGeometry()->m_wellPathPoints);
|
||||
std::set<size_t> wellPathCells = RicWellPathExportCompletionDataFeature::findIntersectedCells(settings.caseToApply()->eclipseCaseData(),
|
||||
wellPath->wellPathGeometry()->m_wellPathPoints);
|
||||
bool isMainBore = false;
|
||||
|
||||
double diameter = wellPath->fishbonesCollection()->wellPathCollection()->holeDiameter(unitSystem);
|
||||
for (const RimFishboneWellPath* fishbonesPath : wellPath->fishbonesCollection()->wellPathCollection()->wellPaths())
|
||||
{
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCells = RigWellPathIntersectionTools::findCellsIntersectedByPath(settings.caseToApply->eclipseCaseData(),
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCells = RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(settings.caseToApply->eclipseCaseData(),
|
||||
fishbonesPath->coordinates(),
|
||||
fishbonesPath->measuredDepths());
|
||||
for (auto& cell : intersectedCells)
|
||||
{
|
||||
if (std::find(wellPathCells.begin(), wellPathCells.end(), cell.globCellIndex) != wellPathCells.end()) continue;
|
||||
if (wellPathCells.count(cell.globCellIndex) ) continue;
|
||||
|
||||
double skinFactor = wellPath->fishbonesCollection()->wellPathCollection()->skinFactor();
|
||||
QString completionMetaData = fishbonesPath->name();
|
||||
@@ -220,7 +220,7 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
|
||||
std::pair< std::vector<cvf::Vec3d>, std::vector<double> > fishbonePerfWellPathCoords = wellPath->wellPathGeometry()->clippedPointSubset(wellPath->fishbonesCollection()->startMD(),
|
||||
wellPathEndMD);
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCellsIntersectionInfo = RigWellPathIntersectionTools::findCellsIntersectedByPath(settings.caseToApply->eclipseCaseData(),
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCellsIntersectionInfo = RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(settings.caseToApply->eclipseCaseData(),
|
||||
fishbonePerfWellPathCoords.first,
|
||||
fishbonePerfWellPathCoords.second);
|
||||
|
||||
|
||||
@@ -719,9 +719,9 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateP
|
||||
|
||||
using namespace std;
|
||||
pair<vector<cvf::Vec3d>, vector<double> > perforationPointsAndMD = wellPath->wellPathGeometry()->clippedPointSubset(interval->startMD(), interval->endMD());
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCells = RigWellPathIntersectionTools::findCellsIntersectedByPath(settings.caseToApply->eclipseCaseData(),
|
||||
perforationPointsAndMD.first,
|
||||
perforationPointsAndMD.second);
|
||||
std::vector<WellPathCellIntersectionInfo> intersectedCells = RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(settings.caseToApply->eclipseCaseData(),
|
||||
perforationPointsAndMD.first,
|
||||
perforationPointsAndMD.second);
|
||||
for (auto& cell : intersectedCells)
|
||||
{
|
||||
bool cellIsActive = activeCellInfo->isActive(cell.globCellIndex);
|
||||
@@ -757,22 +757,17 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeature::generateP
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<size_t> RicWellPathExportCompletionDataFeature::findIntersectingCells(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords)
|
||||
std::set<size_t> RicWellPathExportCompletionDataFeature::findIntersectedCells(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords)
|
||||
{
|
||||
std::set<size_t> cells;
|
||||
|
||||
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::getIntersectedCells(caseData->mainGrid(), coords);
|
||||
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::findRawHexCellIntersections(caseData->mainGrid(), coords);
|
||||
for (auto intersection : intersections)
|
||||
{
|
||||
cells.insert(intersection.m_hexIndex);
|
||||
}
|
||||
|
||||
// Ensure only unique cells are included
|
||||
std::vector<size_t> cellsVector;
|
||||
cellsVector.assign(cells.begin(), cells.end());
|
||||
// Sort cells
|
||||
std::sort(cellsVector.begin(), cellsVector.end());
|
||||
return cellsVector;
|
||||
return cells;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -881,7 +876,7 @@ void RicWellPathExportCompletionDataFeature::assignLateralIntersections(const Ri
|
||||
lateralMDs.push_back(coordMD.second);
|
||||
}
|
||||
|
||||
std::vector<WellPathCellIntersectionInfo> intersections = RigWellPathIntersectionTools::findCellsIntersectedByPath(caseToApply->eclipseCaseData(),
|
||||
std::vector<WellPathCellIntersectionInfo> intersections = RigWellPathIntersectionTools::findCellIntersectionInfosAlongPath(caseToApply->eclipseCaseData(),
|
||||
lateralCoords,
|
||||
lateralMDs);
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
static std::vector<WellSegmentLocation> findWellSegmentLocations(const RimEclipseCase* caseToApply, const RimWellPath* wellPath, const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs);
|
||||
|
||||
//functions also used by RicFishbonesTransmissibilityCalculationFeatureImp
|
||||
static std::vector<size_t> findIntersectingCells(const RigEclipseCaseData* grid, const std::vector<cvf::Vec3d>& coords);
|
||||
static std::set<size_t> findIntersectedCells(const RigEclipseCaseData* grid, const std::vector<cvf::Vec3d>& coords);
|
||||
static void markWellPathCells(const std::vector<size_t>& wellPathCells, std::vector<WellSegmentLocation>* locations);
|
||||
static CellDirection calculateDirectionInCell(RimEclipseCase* eclipseCase, size_t cellIndex, const cvf::Vec3d& lengthsInCell);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user