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:
parent
28460030e5
commit
4577ef973c
@ -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;
|
||||
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);
|
||||
|
||||
if (intersections.empty()) return intersectionInfo;
|
||||
@ -51,23 +51,22 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
|
||||
|
||||
auto intersection = intersections.cbegin();
|
||||
|
||||
if (includeStartCell)
|
||||
//start cell
|
||||
bool foundCell;
|
||||
startPoint = pathCoords[0];
|
||||
cellIndex = findCellFromCoords(grid, startPoint, &foundCell);
|
||||
if (foundCell)
|
||||
{
|
||||
bool foundCell;
|
||||
startPoint = coords[0];
|
||||
cellIndex = findCellFromCoords(grid, startPoint, &foundCell);
|
||||
if (foundCell)
|
||||
{
|
||||
endPoint = intersection->m_intersectionPoint;
|
||||
internalCellLengths = calculateLengthInCell(grid, cellIndex, startPoint, endPoint);
|
||||
intersectionInfo.push_back(WellPathCellIntersectionInfo(cellIndex, startPoint, endPoint, internalCellLengths));
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::debug("Path starts outside valid cell");
|
||||
}
|
||||
endPoint = intersection->m_intersectionPoint;
|
||||
internalCellLengths = calculateLengthInCell(grid, cellIndex, startPoint, endPoint);
|
||||
intersectionInfo.push_back(WellPathCellIntersectionInfo(cellIndex, startPoint, endPoint, internalCellLengths));
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::debug("Path starts outside valid cell");
|
||||
}
|
||||
|
||||
//center cells
|
||||
startPoint = intersection->m_intersectionPoint;
|
||||
cellIndex = intersection->m_hexIndex;
|
||||
|
||||
@ -84,12 +83,10 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
|
||||
++intersection;
|
||||
}
|
||||
|
||||
if (includeEndCell)
|
||||
{
|
||||
endPoint = coords[coords.size() - 1];
|
||||
internalCellLengths = calculateLengthInCell(grid, cellIndex, startPoint, endPoint);
|
||||
intersectionInfo.push_back(WellPathCellIntersectionInfo(cellIndex, startPoint, endPoint, internalCellLengths));
|
||||
}
|
||||
//end cell
|
||||
endPoint = pathCoords[pathCoords.size() - 1];
|
||||
internalCellLengths = calculateLengthInCell(grid, cellIndex, startPoint, endPoint);
|
||||
intersectionInfo.push_back(WellPathCellIntersectionInfo(cellIndex, startPoint, endPoint, internalCellLengths));
|
||||
|
||||
return intersectionInfo;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ struct WellPathCellIntersectionInfo {
|
||||
size_t cellIndex;
|
||||
cvf::Vec3d startPoint;
|
||||
cvf::Vec3d endPoint;
|
||||
cvf::Vec3d internalCellLengths;
|
||||
cvf::Vec3d internalCellLengths; // intersectionLengthsInCellCS
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
@ -53,7 +53,7 @@ struct WellPathCellIntersectionInfo {
|
||||
class RigWellPathIntersectionTools
|
||||
{
|
||||
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user