#2425 Export Completions : Move function

This commit is contained in:
Magne Sjaastad 2018-01-31 08:41:43 +01:00
parent f8b020e364
commit 8fbd417c4f
4 changed files with 24 additions and 20 deletions

View File

@ -190,7 +190,7 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findFishboneImportedLate
const RicExportCompletionDataSettingsUi& settings)
{
RiaEclipseUnitTools::UnitSystem unitSystem = settings.caseToApply->eclipseCaseData()->unitsType();
std::set<size_t> wellPathCells = RicWellPathExportCompletionDataFeatureImpl::findIntersectedCells(settings.caseToApply()->eclipseCaseData(),
std::set<size_t> wellPathCells = RicFishbonesTransmissibilityCalculationFeatureImp::findIntersectedCells(settings.caseToApply()->eclipseCaseData(),
wellPath->wellPathGeometry()->m_wellPathPoints);
bool isMainBore = false;
@ -251,3 +251,19 @@ void RicFishbonesTransmissibilityCalculationFeatureImp::findMainWellBoreParts(st
wellBorePartsInCells[cell.globCellIndex].push_back(wellBorePart);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::set<size_t> RicFishbonesTransmissibilityCalculationFeatureImp::findIntersectedCells(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords)
{
std::set<size_t> cells;
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::findRawHexCellIntersections(caseData->mainGrid(), coords);
for (auto intersection : intersections)
{
cells.insert(intersection.m_hexIndex);
}
return cells;
}

View File

@ -18,12 +18,17 @@
#pragma once
#include "cvfBase.h"
#include "cvfVector3.h"
#include <vector>
#include <map>
#include <set>
class RigCompletionData;
class RimWellPath;
class RicExportCompletionDataSettingsUi;
class RigEclipseCaseData;
struct WellBorePartForTransCalc;
@ -51,4 +56,6 @@ 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);
};

View File

@ -776,22 +776,6 @@ std::vector<RigCompletionData> RicWellPathExportCompletionDataFeatureImpl::gener
return completionData;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::set<size_t> RicWellPathExportCompletionDataFeatureImpl::findIntersectedCells(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords)
{
std::set<size_t> cells;
std::vector<HexIntersectionInfo> intersections = RigWellPathIntersectionTools::findRawHexCellIntersections(caseData->mainGrid(), coords);
for (auto intersection : intersections)
{
cells.insert(intersection.m_hexIndex);
}
return cells;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -118,9 +118,6 @@ public:
static std::vector<WellSegmentLocation> findWellSegmentLocations(const RimEclipseCase* caseToApply, const RimWellPath* wellPath);
static std::vector<WellSegmentLocation> findWellSegmentLocations(const RimEclipseCase* caseToApply, const RimWellPath* wellPath, const std::vector<RimFishbonesMultipleSubs*>& fishbonesSubs);
// TODO : Move
static std::set<size_t> findIntersectedCells(const RigEclipseCaseData* grid, const std::vector<cvf::Vec3d>& coords);
static CellDirection calculateDirectionInCell(RimEclipseCase* eclipseCase, size_t globalCellIndex, const cvf::Vec3d& lengthsInCell);
static double calculateTransmissibility(RimEclipseCase* eclipseCase,