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
57 GridManager(const EclipseGrid& inputGrid,
58 const std::vector<double>& poreVolumes);
59#endif
60
62 GridManager(int nx, int ny);
63
65 GridManager(int nx, int ny, double dx, double dy);
66
68 GridManager(int nx, int ny, int nz);
69
71 GridManager(int nx, int ny, int nz,
72 double dx, double dy, double dz);
73
77 explicit GridManager(const std::string& input_filename);
78
81
85 const UnstructuredGrid* c_grid() const;
86
87 private:
88 // Disable copying and assignment.
89 GridManager(const GridManager& other) = delete;
90 GridManager& operator=(const GridManager& other) = delete;
91
92#if HAVE_ECL_INPUT
93 // Construct corner-point grid from EclipseGrid.
94 void initFromEclipseGrid(const EclipseGrid& inputGrid,
95 const std::vector<double>& poreVolumes);
96#endif
97
98 // The managed UnstructuredGrid.
100 };
101
102} // namespace Opm
103
104#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