opm-grid
Toggle main menu visibility
Loading...
Searching...
No Matches
LevelCartesianIndexMapper.hpp
1
//===========================================================================
2
//
3
// File: LevelCartesianIndexMapper.hpp
4
//
5
// Created: Tue October 01 11:44:00 2024
6
//
7
// Author(s): Antonella Ritorto <antonella.ritorto@opm-op.com>
8
//
9
//
10
// $Date$
11
//
12
// $Revision$
13
//
14
//===========================================================================
15
16
/*
17
Copyright 2024 Equinor ASA.
18
19
This file is part of The Open Porous Media project (OPM).
20
21
OPM is free software: you can redistribute it and/or modify
22
it under the terms of the GNU General Public License as published by
23
the Free Software Foundation, either version 3 of the License, or
24
(at your option) any later version.
25
26
OPM is distributed in the hope that it will be useful,
27
but WITHOUT ANY WARRANTY; without even the implied warranty of
28
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29
GNU General Public License for more details.
30
31
You should have received a copy of the GNU General Public License
32
along with OPM. If not, see <http://www.gnu.org/licenses/>.
33
*/
34
35
#ifndef OPM_LEVELCARTESIANINDEXMAPPER_HEADER
36
#define OPM_LEVELCARTESIANINDEXMAPPER_HEADER
37
38
#include <array>
39
40
namespace
Opm
41
{
42
// Interface class to access the local Cartesian grid of each level grid (when refinement).
43
template
<
class
Gr
id
>
44
class
LevelCartesianIndexMapper
45
{
46
public
:
47
// Dimension of the grid.
48
static
constexpr
int
dimension = Grid :: dimension ;
49
50
// Constructor taking a grid.
51
explicit
LevelCartesianIndexMapper(
const
Grid& )
52
{}
53
54
// Return the number of cells in each direction (Cartesian dimensions) of a local Cartesian grid with level "level"
55
const
std::array<int, dimension>& cartesianDimensions(
int
/*level*/
)
const
56
{
57
static
std::array<int, dimension> a;
58
return
a;
59
}
60
61
// Return total number of cells in a local Cartesian grid with level "level".
62
int
cartesianSize(
int
/*level*/
)
const
63
{
64
return
0;
65
}
66
67
// Return number of cells in the active local Cartesian grid with level "level".
68
int
compressedSize(
int
/*level*/
)
const
69
{
70
return
0;
71
}
72
73
// Return index of a cell in the local Cartesian grid with level "level".
74
int
cartesianIndex(
const
int
/* compressedElementIndex */
,
const
int
/*level*/
)
const
75
{
76
return
0;
77
}
78
79
// Compute Cartesian coordinate, i.e. IJK, for a given cell, on a given local Cartesian grid with level "level".
80
void
cartesianCoordinate(
const
int
/* compressedElementIndexOnLevel */
,
81
std::array<int,dimension>&
/* coordsOnLevel */
,
82
int
/*level*/
)
const
83
{
84
}
85
};
86
87
}
// end namespace Opm
88
#endif
Opm
Holds the implementation of the CpGrid as a pimple.
Definition
CellQuadrature.cpp:68
opm
grid
common
LevelCartesianIndexMapper.hpp
Generated by
1.17.0