My Project
Loading...
Searching...
No Matches
GridManager.hpp
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
25struct UnstructuredGrid;
26struct grdecl;
27
28namespace Opm
29{
30
31#if HAVE_ECL_INPUT
32class EclipseGrid;
33#endif
34
44 {
45 public:
46
47#if HAVE_ECL_INPUT
49 explicit GridManager(const EclipseGrid& inputGrid);
50
56 GridManager(const EclipseGrid& inputGrid,
57 const std::vector<double>& poreVolumes);
58#endif
59
61 GridManager(int nx, int ny);
62
64 GridManager(int nx, int ny, double dx, double dy);
65
67 GridManager(int nx, int ny, int nz);
68
70 GridManager(int nx, int ny, int nz,
71 double dx, double dy, double dz);
72
76 explicit GridManager(const std::string& input_filename);
77
80
84 const UnstructuredGrid* c_grid() const;
85
86 private:
87 // Disable copying and assignment.
88 GridManager(const GridManager& other) = delete;
89 GridManager& operator=(const GridManager& other) = delete;
90
91#if HAVE_ECL_INPUT
92 // Construct corner-point grid from EclipseGrid.
93 void initFromEclipseGrid(const EclipseGrid& inputGrid,
94 const std::vector<double>& poreVolumes);
95#endif
96
97 // The managed UnstructuredGrid.
99 };
100
101} // namespace Opm
102
103#endif // OPM_GRIDMANAGER_HEADER_INCLUDED
This class manages an Opm::UnstructuredGrid in the sense that it encapsulates creation and destructio...
Definition GridManager.hpp:44
const UnstructuredGrid * c_grid() const
Access the managed UnstructuredGrid.
Definition GridManager.cpp:126
~GridManager()
Destructor.
Definition GridManager.cpp:115
Holds the implementation of the CpGrid as a pimple.
Definition CellQuadrature.cpp:68
Data structure for an unstructured grid, unstructured meaning that any cell may have an arbitrary num...
Definition UnstructuredGrid.h:99
Raw corner-point specification of a particular geological model.
Definition preprocess.h:56