opm-common
RigEclipseWellLogExtractor.hpp
1 //
3 // Copyright (C) Statoil ASA
4 // Copyright (C) Ceetron Solutions AS
5 //
6 // ResInsight is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
12 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 // FITNESS FOR A PARTICULAR PURPOSE.
14 //
15 // See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 // for more details.
17 //
19 
20 #pragma once
21 
22 #include <external/resinsight/ReservoirDataModel/RigWellLogExtractor.h>
23 #include <external/resinsight/LibGeometry/cvfBoundingBoxTree.h>
24 
25 #include <opm/input/eclipse/EclipseState/Grid/EclipseGrid.hpp>
26 #include <opm/input/eclipse/Schedule/ScheduleGrid.hpp>
27 
28 #include <cstddef>
29 
30 namespace Opm {
31 class EclipseGrid;
32 class ScheduleGrid;
33 }
34 
35 namespace external {
36 
37 class RigEclipseCaseData;
38 class RigWellPath;
39 class RigResultAccessor;
40 
41 namespace cvf
42 {
43 class BoundingBox;
44 }
45 
46 //==================================================================================================
48 //==================================================================================================
49 class RigEclipseWellLogExtractor : public RigWellLogExtractor
50 {
51 public:
52  RigEclipseWellLogExtractor( const RigWellPath* wellpath, const Opm::EclipseGrid& grid, cvf::ref<cvf::BoundingBoxTree>& cellSearchTree);
53 
54  cvf::ref<cvf::BoundingBoxTree> getCellSearchTree();
55 private:
56  void calculateIntersection();
57  std::vector<std::size_t> findCloseCellIndices( const cvf::BoundingBox& bb );
58  cvf::Vec3d
59  calculateLengthInCell( std::size_t cellIndex, const cvf::Vec3d& startPoint, const cvf::Vec3d& endPoint ) const override;
60 
61  cvf::Vec3d calculateLengthInCell( const std::array<cvf::Vec3d, 8>& hexCorners,
62  const cvf::Vec3d& startPoint,
63  const cvf::Vec3d& endPoint ) const;
64 
65  void hexCornersOpmToResinsight( cvf::Vec3d hexCorners[8],
66  std::size_t cellIndex ) const;
67 
68  void findCellLocalXYZ( const std::array<cvf::Vec3d, 8>& hexCorners,
69  cvf::Vec3d& localXdirection,
70  cvf::Vec3d& localYdirection,
71  cvf::Vec3d& localZdirection ) const;
72  void buildCellSearchTree();
73  void findIntersectingCells( const cvf::BoundingBox& inputBB, std::vector<std::size_t>* cellIndices ) const;
74  void computeCachedData();
75 
76  const Opm::EclipseGrid& m_grid;
77  cvf::ref<cvf::BoundingBoxTree> m_cellSearchTree;
78 };
79 } //namespace external
Definition: RigEclipseWellLogExtractor.cpp:45
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition: EclipseGrid.hpp:63
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: RigEclipseWellLogExtractor.hpp:49