My Project
Loading...
Searching...
No Matches
ActiveGridCells.hpp
1/*
2 Copyright 2019 Equinor ASA
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#ifndef ACTIVEGRIDCELLS_HPP
20#define ACTIVEGRIDCELLS_HPP
21
22#include <opm/input/eclipse/EclipseState/Grid/GridDims.hpp>
23
24#include <array>
25#include <vector>
26
27namespace Opm
28{
29
35 : public GridDims
36{
37public:
43 ActiveGridCells(std::array<int, 3> xyz,
44 const int* globalCell, std::size_t nc);
45
53 ActiveGridCells(std::size_t nx, std::size_t ny, std::size_t nz,
54 const int* globalCell, std::size_t nc);
55
56 bool cellActive(std::size_t i, std::size_t j, std::size_t k) const;
57
58 bool cellActive(std::size_t cartesianIndex) const;
59
60 std::vector<int> actNum() const;
61
65 int localCell(std::size_t cartesianIndex) const;
66
72 int localCell(std::size_t i, std::size_t j, std::size_t k) const;
73
74protected:
78 std::vector<int> localCell_;
79};
80} // end namespace Opm
81#endif // ACTIVEGRIDCELLS_HPP
Simple class capturing active cells of a grid.
Definition ActiveGridCells.hpp:36
int localCell(std::size_t cartesianIndex) const
Get the local index of a cell.
Definition ActiveGridCells.cpp:52
std::vector< int > localCell_
Maps the cartesian index to a compressed local index.
Definition ActiveGridCells.hpp:78
Definition GridDims.hpp:31
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30