mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1531 Display message in logger if perforation interval is outside eclipse grid
This commit is contained in:
parent
5cafccdc80
commit
99da23d4a7
@ -18,6 +18,8 @@
|
||||
|
||||
#include "RigWellPathIntersectionTools.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RigWellPath.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
@ -50,11 +52,19 @@ std::vector<WellPathCellIntersectionInfo> RigWellPathIntersectionTools::findCell
|
||||
|
||||
if (includeStartCell)
|
||||
{
|
||||
bool foundCell;
|
||||
startPoint = coords[0];
|
||||
endPoint = intersection->m_intersectionPoint;
|
||||
cellIndex = findCellFromCoords(grid, startPoint);
|
||||
direction = calculateDirectionInCell(grid, cellIndex, startPoint, endPoint);
|
||||
intersectionInfo.push_back(WellPathCellIntersectionInfo(cellIndex, direction, startPoint, endPoint));
|
||||
cellIndex = findCellFromCoords(grid, startPoint, &foundCell);
|
||||
if (foundCell)
|
||||
{
|
||||
endPoint = intersection->m_intersectionPoint;
|
||||
direction = calculateDirectionInCell(grid, cellIndex, startPoint, endPoint);
|
||||
intersectionInfo.push_back(WellPathCellIntersectionInfo(cellIndex, direction, startPoint, endPoint));
|
||||
}
|
||||
else
|
||||
{
|
||||
RiaLogging::debug("Path starts outside valid cell");
|
||||
}
|
||||
}
|
||||
|
||||
startPoint = intersection->m_intersectionPoint;
|
||||
@ -228,7 +238,7 @@ std::vector<size_t> RigWellPathIntersectionTools::findCloseCells(const RigMainGr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RigWellPathIntersectionTools::findCellFromCoords(const RigMainGrid* grid, const cvf::Vec3d& coords)
|
||||
size_t RigWellPathIntersectionTools::findCellFromCoords(const RigMainGrid* grid, const cvf::Vec3d& coords, bool* foundCell)
|
||||
{
|
||||
const std::vector<cvf::Vec3d>& nodeCoords = grid->nodes();
|
||||
|
||||
@ -246,12 +256,12 @@ size_t RigWellPathIntersectionTools::findCellFromCoords(const RigMainGrid* grid,
|
||||
|
||||
if (RigHexIntersector::isPointInCell(coords, hexCorners))
|
||||
{
|
||||
*foundCell = true;
|
||||
return closeCell;
|
||||
}
|
||||
}
|
||||
|
||||
// Coordinate is outside any cells?
|
||||
CVF_ASSERT(false);
|
||||
*foundCell = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
static WellPathCellDirection calculateDirectionInCell(const RigMainGrid* grid, 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);
|
||||
static size_t findCellFromCoords(const RigMainGrid* caseData, const cvf::Vec3d& coords, bool* foundCell);
|
||||
|
||||
static std::array<cvf::Vec3d, 8> getCellHexCorners(const RigMainGrid* grid, size_t cellIndex);
|
||||
static void setHexCorners(const RigCell& cell, const std::vector<cvf::Vec3d>& nodeCoords, cvf::Vec3d* hexCorners);
|
||||
|
Loading…
Reference in New Issue
Block a user