opm-grid
Toggle main menu visibility
Loading...
Searching...
No Matches
CartesianIndexMapper.hpp
1
#ifndef OPM_CARTESIANINDEXMAPPER_HEADER
2
#define OPM_CARTESIANINDEXMAPPER_HEADER
3
4
#include <array>
5
#include <cassert>
6
7
#include <dune/common/exceptions.hh>
8
9
namespace
Dune
10
{
14
template
<
class
Gr
id
>
15
class
CartesianIndexMapper
16
{
17
public
:
19
static
const
int
dimension
= Grid :: dimension ;
20
22
explicit
CartesianIndexMapper
(
const
Grid& )
23
{
24
DUNE_THROW(InvalidStateException,
"CartesianIndexMapper not specialized for given grid"
);
25
}
26
28
const
std::array<int, dimension>&
cartesianDimensions
()
const
29
{
30
static
std::array<int, dimension> a;
31
return
a;
32
}
33
35
int
cartesianSize
()
const
36
{
37
return
0;
38
}
39
41
int
compressedSize
()
const
42
{
43
return
0;
44
}
45
47
int
cartesianIndex
(
const
int
/* compressedElementIndex */
)
const
48
{
49
return
0;
50
}
51
53
void
cartesianCoordinate
(
const
int
/* compressedElementIndex */
, std::array<int,dimension>&
/* coords */
)
const
54
{
55
}
56
};
57
58
}
// end namespace Opm
59
#endif
Dune::CartesianIndexMapper::cartesianIndex
int cartesianIndex(const int) const
return index of the cells in the logical Cartesian grid
Definition
CartesianIndexMapper.hpp:47
Dune::CartesianIndexMapper::compressedSize
int compressedSize() const
return number of cells in the active grid
Definition
CartesianIndexMapper.hpp:41
Dune::CartesianIndexMapper::cartesianDimensions
const std::array< int, dimension > & cartesianDimensions() const
return Cartesian dimensions, i.e.
Definition
CartesianIndexMapper.hpp:28
Dune::CartesianIndexMapper::dimension
static const int dimension
dimension of the grid
Definition
CartesianIndexMapper.hpp:19
Dune::CartesianIndexMapper::CartesianIndexMapper
CartesianIndexMapper(const Grid &)
constructor taking grid
Definition
CartesianIndexMapper.hpp:22
Dune::CartesianIndexMapper::cartesianSize
int cartesianSize() const
return total number of cells in the logical Cartesian grid
Definition
CartesianIndexMapper.hpp:35
Dune::CartesianIndexMapper::cartesianCoordinate
void cartesianCoordinate(const int, std::array< int, dimension > &) const
return Cartesian coordinate, i.e.
Definition
CartesianIndexMapper.hpp:53
Dune
The namespace Dune is the main namespace for all Dune code.
Definition
CartesianIndexMapper.hpp:10
opm
grid
common
CartesianIndexMapper.hpp
Generated by
1.17.0