From ef4b0fa0d330806355eed4882da9a764722d3a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Fri, 4 Sep 2015 10:02:47 +0200 Subject: [PATCH] Reorganized wellLogExtraction code, preparing for GeoMech variant. --- .../RigEclipseWellLogExtractor.cpp | 78 +++++++++---------- .../RigEclipseWellLogExtractor.h | 33 ++++---- 2 files changed, 54 insertions(+), 57 deletions(-) diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.cpp index 8327beccbb..f6c95c9d49 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.cpp +++ b/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.cpp @@ -25,20 +25,10 @@ #include "cvfBoundingBox.h" #include "cvfGeometryTools.h" +//================================================================================================== +/// Internal class for intersection point info +//================================================================================================== - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -RigEclipseWellLogExtractor::RigEclipseWellLogExtractor(const RigCaseData* aCase, const RigWellPath* wellpath) - : m_caseData(aCase), m_wellPath(wellpath) -{ - calculateIntersection(); -} - -//-------------------------------------------------------------------------------------------------- -/// Internal class for intersection point info -//-------------------------------------------------------------------------------------------------- struct HexIntersectionInfo { @@ -98,9 +88,10 @@ int lineHexCellIntersection(const cvf::Vec3d p1, const cvf::Vec3d p2, const cvf: return intersectionCount; } -//-------------------------------------------------------------------------------------------------- -/// Class used to sort the intersections along the wellpath -//-------------------------------------------------------------------------------------------------- +//================================================================================================== +/// Class used to sort the intersections along the wellpath +//================================================================================================== + struct WellPathDepthPoint { WellPathDepthPoint(double md, bool entering): measuredDepth(md), isEnteringCell(entering){} @@ -149,6 +140,36 @@ struct WellPathDepthPoint } }; +//================================================================================================== +/// +//================================================================================================== + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +RigEclipseWellLogExtractor::RigEclipseWellLogExtractor(const RigCaseData* aCase, const RigWellPath* wellpath) + : m_caseData(aCase), m_wellPath(wellpath) +{ + calculateIntersection(); +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigEclipseWellLogExtractor::measuredDepth() +{ + return m_measuredDepth; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +const std::vector& RigEclipseWellLogExtractor::trueVerticalDepth() +{ + return m_trueVerticalDepth; +} + + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -271,28 +292,3 @@ std::vector RigEclipseWellLogExtractor::findCloseCells(const cvf::Boundi return closeCells; } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const std::vector& RigEclipseWellLogExtractor::measuredDepth() -{ - return m_measuredDepth; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const std::vector& RigEclipseWellLogExtractor::trueVerticalDepth() -{ - return m_trueVerticalDepth; -} - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -const std::vector& RigEclipseWellLogExtractor::cellIndicesPrSegment() -{ - CVF_ASSERT(false); // Not implemented - return m_globalCellIndicesPrSegment; -} diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.h b/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.h index e02ee60f8c..4e6c6effdc 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.h +++ b/ApplicationCode/ReservoirDataModel/RigEclipseWellLogExtractor.h @@ -43,26 +43,27 @@ class RigEclipseWellLogExtractor : public cvf::Object public: RigEclipseWellLogExtractor(const RigCaseData* aCase, const RigWellPath* wellpath); - const std::vector& measuredDepth(); - const std::vector& trueVerticalDepth(); - const std::vector& cellIndicesPrSegment(); + const std::vector& measuredDepth(); + const std::vector& trueVerticalDepth(); - void curveData(const RigResultAccessor* resultAccessor, std::vector* values ); + void curveData(const RigResultAccessor* resultAccessor, std::vector* values ); - const RigCaseData* caseData() { return m_caseData.p();} - const RigWellPath* wellPathData() { return m_wellPath.p();} + const RigCaseData* caseData() { return m_caseData.p();} + const RigWellPath* wellPathData() { return m_wellPath.p();} private: - void calculateIntersection(); - std::vector findCloseCells(const cvf::BoundingBox& bb); - std::vector m_measuredDepth; - std::vector m_trueVerticalDepth; - std::vector m_globalCellIndicesPrSegment; - std::vector m_intersections; - std::vector m_intersectedCells; - std::vector m_intersectedCellFaces; + void calculateIntersection(); + std::vector findCloseCells(const cvf::BoundingBox& bb); - cvf::cref m_caseData; - cvf::cref m_wellPath; + std::vector m_measuredDepth; + std::vector m_trueVerticalDepth; + + std::vector m_intersections; + std::vector m_intersectedCells; + std::vector + m_intersectedCellFaces; + + cvf::cref m_caseData; + cvf::cref m_wellPath; };