mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removing (never used) arguments with default in RigWellPathIntersectionTools::findCellsIntersectedByPath (and renaming inside function)
This commit is contained in:
@@ -32,14 +32,14 @@
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCellsIntersectedByPath(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords, bool includeStartCell, bool includeEndCell)
|
std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCellsIntersectedByPath(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& pathCoords)
|
||||||
{
|
{
|
||||||
std::vector<WellPathCellIntersectionInfo> intersectionInfo;
|
std::vector<WellPathCellIntersectionInfo> intersectionInfo;
|
||||||
const RigMainGrid* grid = caseData->mainGrid();
|
const RigMainGrid* grid = caseData->mainGrid();
|
||||||
|
|
||||||
if (coords.size() < 2) return intersectionInfo;
|
if (pathCoords.size() < 2) return intersectionInfo;
|
||||||
|
|
||||||
std::vector<HexIntersectionInfo> intersections = getIntersectedCells(grid, coords);
|
std::vector<HexIntersectionInfo> intersections = getIntersectedCells(grid, pathCoords);
|
||||||
removeEnteringIntersections(&intersections);
|
removeEnteringIntersections(&intersections);
|
||||||
|
|
||||||
if (intersections.empty()) return intersectionInfo;
|
if (intersections.empty()) return intersectionInfo;
|
||||||
@@ -51,10 +51,9 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
|
|||||||
|
|
||||||
auto intersection = intersections.cbegin();
|
auto intersection = intersections.cbegin();
|
||||||
|
|
||||||
if (includeStartCell)
|
//start cell
|
||||||
{
|
|
||||||
bool foundCell;
|
bool foundCell;
|
||||||
startPoint = coords[0];
|
startPoint = pathCoords[0];
|
||||||
cellIndex = findCellFromCoords(grid, startPoint, &foundCell);
|
cellIndex = findCellFromCoords(grid, startPoint, &foundCell);
|
||||||
if (foundCell)
|
if (foundCell)
|
||||||
{
|
{
|
||||||
@@ -66,8 +65,8 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
|
|||||||
{
|
{
|
||||||
RiaLogging::debug("Path starts outside valid cell");
|
RiaLogging::debug("Path starts outside valid cell");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
//center cells
|
||||||
startPoint = intersection->m_intersectionPoint;
|
startPoint = intersection->m_intersectionPoint;
|
||||||
cellIndex = intersection->m_hexIndex;
|
cellIndex = intersection->m_hexIndex;
|
||||||
|
|
||||||
@@ -84,12 +83,10 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
|
|||||||
++intersection;
|
++intersection;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (includeEndCell)
|
//end cell
|
||||||
{
|
endPoint = pathCoords[pathCoords.size() - 1];
|
||||||
endPoint = coords[coords.size() - 1];
|
|
||||||
internalCellLengths = calculateLengthInCell(grid, cellIndex, startPoint, endPoint);
|
internalCellLengths = calculateLengthInCell(grid, cellIndex, startPoint, endPoint);
|
||||||
intersectionInfo.push_back(WellPathCellIntersectionInfo(cellIndex, startPoint, endPoint, internalCellLengths));
|
intersectionInfo.push_back(WellPathCellIntersectionInfo(cellIndex, startPoint, endPoint, internalCellLengths));
|
||||||
}
|
|
||||||
|
|
||||||
return intersectionInfo;
|
return intersectionInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ struct WellPathCellIntersectionInfo {
|
|||||||
size_t cellIndex;
|
size_t cellIndex;
|
||||||
cvf::Vec3d startPoint;
|
cvf::Vec3d startPoint;
|
||||||
cvf::Vec3d endPoint;
|
cvf::Vec3d endPoint;
|
||||||
cvf::Vec3d internalCellLengths;
|
cvf::Vec3d internalCellLengths; // intersectionLengthsInCellCS
|
||||||
};
|
};
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
@@ -53,7 +53,7 @@ struct WellPathCellIntersectionInfo {
|
|||||||
class RigWellPathIntersectionTools
|
class RigWellPathIntersectionTools
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static std::vector<WellPathCellIntersectionInfo> findCellsIntersectedByPath(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& coords, bool includeStartCell = true, bool includeEndCell = true);
|
static std::vector<WellPathCellIntersectionInfo> findCellsIntersectedByPath(const RigEclipseCaseData* caseData, const std::vector<cvf::Vec3d>& pathCoords);
|
||||||
|
|
||||||
static std::vector<HexIntersectionInfo> getIntersectedCells(const RigMainGrid* grid, const std::vector<cvf::Vec3d>& coords);
|
static std::vector<HexIntersectionInfo> getIntersectedCells(const RigMainGrid* grid, const std::vector<cvf::Vec3d>& coords);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user