GridManager.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2012 SINTEF ICT, Applied Mathematics.
3 
4  This file is part of the Open Porous Media project (OPM).
5 
6  OPM 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  OPM is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with OPM. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef OPM_GRIDMANAGER_HEADER_INCLUDED
21 #define OPM_GRIDMANAGER_HEADER_INCLUDED
22 
23 #include <opm/parser/eclipse/Deck/Deck.hpp>
24 #include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
25 
26 #include <string>
27 
28 struct UnstructuredGrid;
29 struct grdecl;
30 
31 namespace Opm
32 {
42  {
43  public:
45  explicit GridManager(Opm::DeckConstPtr deck);
46 
48  explicit GridManager(Opm::EclipseGridConstPtr eclipseGrid);
49 
55  GridManager(Opm::EclipseGridConstPtr eclipseGrid,
56  const std::vector<double>& poreVolumes);
57 
59  GridManager(int nx, int ny);
60 
62  GridManager(int nx, int ny, double dx, double dy);
63 
65  GridManager(int nx, int ny, int nz);
66 
68  GridManager(int nx, int ny, int nz,
69  double dx, double dy, double dz);
70 
74  explicit GridManager(const std::string& input_filename);
75 
77  ~GridManager();
78 
82  const UnstructuredGrid* c_grid() const;
83 
84  static void createGrdecl(Opm::DeckConstPtr deck, struct grdecl &grdecl);
85 
86  private:
87  // Disable copying and assignment.
88  GridManager(const GridManager& other);
89  GridManager& operator=(const GridManager& other);
90 
91  // Construct corner-point grid from EclipseGrid.
92  void initFromEclipseGrid(Opm::EclipseGridConstPtr eclipseGrid,
93  const std::vector<double>& poreVolumes);
94 
95  // The managed UnstructuredGrid.
96  UnstructuredGrid* ug_;
97  };
98 
99 } // namespace Opm
100 
101 #endif // OPM_GRIDMANAGER_HEADER_INCLUDED
Definition: grid.h:98
Definition: AnisotropicEikonal.hpp:43
Definition: preprocess.h:56
Definition: GridManager.hpp:41
~GridManager()
Destructor.
const UnstructuredGrid * c_grid() const
static void createGrdecl(Opm::DeckConstPtr deck, struct grdecl &grdecl)
GridManager(Opm::DeckConstPtr deck)
Construct a 3d corner-point grid or tensor grid from a deck.