opm-grid
Toggle main menu visibility
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
#include <vector>
25
26
struct
UnstructuredGrid
;
27
struct
grdecl
;
28
29
namespace
Opm
30
{
31
32
#if HAVE_ECL_INPUT
33
class
EclipseGrid;
34
#endif
35
44
class
GridManager
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
82
~GridManager
();
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
Opm::GridManager::GridManager
GridManager(int nx, int ny)
Construct a 2d cartesian grid with cells of unit size.
Definition
GridManager.cpp:62
Opm::GridManager::c_grid
const UnstructuredGrid * c_grid() const
Access the managed UnstructuredGrid.
Definition
GridManager.cpp:128
Opm::GridManager::~GridManager
~GridManager()
Destructor.
Definition
GridManager.cpp:117
Opm
Holds the implementation of the CpGrid as a pimple.
Definition
CellQuadrature.cpp:68
UnstructuredGrid
Data structure for an unstructured grid, unstructured meaning that any cell may have an arbitrary num...
Definition
UnstructuredGrid.h:101
grdecl
Raw corner-point specification of a particular geological model.
Definition
preprocess.h:56
opm
grid
GridManager.hpp
Generated by
1.17.0