My Project
EclipseGridInspector.hpp
1 //===========================================================================
2 //
3 // File: EclipseGridInspector.h
4 //
5 // Created: Mon Jun 2 09:46:08 2008
6 //
7 // Author: Atgeirr F Rasmussen <atgeirr@sintef.no>
8 //
9 // $Date$
10 //
11 // Revision: $Id: EclipseGridInspector.h,v 1.2 2008/08/18 14:16:12 atgeirr Exp $
12 //
13 //===========================================================================
14 
15 /*
16  Copyright 2009, 2010 SINTEF ICT, Applied Mathematics.
17  Copyright 2009, 2010 Statoil ASA.
18 
19  This file is part of the Open Porous Media project (OPM).
20 
21  OPM is free software: you can redistribute it and/or modify
22  it under the terms of the GNU General Public License as published by
23  the Free Software Foundation, either version 3 of the License, or
24  (at your option) any later version.
25 
26  OPM is distributed in the hope that it will be useful,
27  but WITHOUT ANY WARRANTY; without even the implied warranty of
28  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29  GNU General Public License for more details.
30 
31  You should have received a copy of the GNU General Public License
32  along with OPM. If not, see <http://www.gnu.org/licenses/>.
33 */
34 
35 #ifndef OPM_ECLIPSEGRIDINSPECTOR_HEADER
36 #define OPM_ECLIPSEGRIDINSPECTOR_HEADER
37 
38 #include <vector>
39 #include <array>
40 
41 #include <opm/parser/eclipse/Deck/Deck.hpp>
42 
43 namespace Opm
44 {
45 
56 {
57 public:
61 
64  double cellVolumeVerticalPillars(int i, int j, int k) const;
65 
68  double cellVolumeVerticalPillars(int cell_idx) const;
69 
72  std::pair<double,double> cellDips(int i, int j, int k) const;
73  std::pair<double,double> cellDips(int cell_idx) const;
74 
75  // Convert global cell index to logical ijk-coordinates
76  std::array<int, 3> cellIdxToLogicalCoords(int cell_idx) const;
77 
81  std::array<double, 6> getGridLimits() const;
82 
85  std::array<int, 3> gridSize() const;
86 
91  std::array<double, 8> cellZvals(int i, int j, int k) const;
92 
93 private:
94  Opm::Deck deck_;
95  int logical_gridsize_[3];
96  void init_();
97  void checkLogicalCoords(int i, int j, int k) const;
98 };
99 
100 } // namespace Opm
101 
102 #endif // OPM_ECLIPSEGRIDINSPECTOR_HEADER
103 
Definition: Deck.hpp:119
A class for inspecting the contents of an eclipse file.
Definition: EclipseGridInspector.hpp:56
std::pair< double, double > cellDips(int i, int j, int k) const
Compute the average dip in x- and y-direction of the cell tops and bottoms relative to the xy-plane.
std::array< double, 8 > cellZvals(int i, int j, int k) const
Returns the eight z-values associated with a given cell.
double cellVolumeVerticalPillars(int cell_idx) const
Assuming that the pillars are vertical, compute the volume of the cell given by the cell index.
std::array< double, 6 > getGridLimits() const
Returns a vector with the outer limits of grid (in the grid's unit).
EclipseGridInspector(Opm::Deck)
Constructor taking a parser as argument.
double cellVolumeVerticalPillars(int i, int j, int k) const
Assuming that the pillars are vertical, compute the volume of the cell given by logical coordinates (...
std::array< int, 3 > gridSize() const
Returns the extent of the logical cartesian grid as number of cells in the (i, j, k) directions.
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29