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 <string>
24#include <vector>
25
26struct UnstructuredGrid;
27struct grdecl;
28
29namespace Opm
30{
31
32#if HAVE_ECL_INPUT
33class EclipseGrid;
34#endif
35
45 {
46 public:
47
48#if HAVE_ECL_INPUT
50 explicit GridManager(const EclipseGrid& inputGrid,
51 bool edge_conformal = false);
52
58 GridManager(const EclipseGrid& inputGrid,
59 const std::vector<double>& poreVolumes,
60 bool edge_conformal);
61#endif
62
64 GridManager(int nx, int ny);
65
67 GridManager(int nx, int ny, double dx, double dy);
68
70 GridManager(int nx, int ny, int nz);
71
73 GridManager(int nx, int ny, int nz,
74 double dx, double dy, double dz);
75
79 explicit GridManager(const std::string& input_filename);
80
83
87 const UnstructuredGrid* c_grid() const;
88
89 private:
90 // Disable copying and assignment.
91 GridManager(const GridManager& other) = delete;
92 GridManager& operator=(const GridManager& other) = delete;
93
94#if HAVE_ECL_INPUT
95 // Construct corner-point grid from EclipseGrid.
96 void initFromEclipseGrid(const EclipseGrid& inputGrid,
97 const std::vector<double>& poreVolumes,
98 bool edge_conformal);
99#endif
100
101 // The managed UnstructuredGrid.
102 UnstructuredGrid* ug_;
103 };
104
105} // namespace Opm
106
107#endif // OPM_GRIDMANAGER_HEADER_INCLUDED
Definition: GridManager.hpp:45
GridManager(int nx, int ny, int nz)
Construct a 3d cartesian grid with cells of unit size.
GridManager(int nx, int ny, int nz, double dx, double dy, double dz)
Construct a 3d cartesian grid with cells of size [dx, dy, dz].
GridManager(const std::string &input_filename)
GridManager(int nx, int ny)
Construct a 2d cartesian grid with cells of unit size.
const UnstructuredGrid * c_grid() const
~GridManager()
Destructor.
GridManager(int nx, int ny, double dx, double dy)
Construct a 2d cartesian grid with cells of size [dx, dy].
Holds the implementation of the CpGrid as a pimple.
Definition: CellQuadrature.hpp:26
Definition: UnstructuredGrid.h:101
Definition: preprocess.h:56