ConnectivityGraph.hpp
Go to the documentation of this file.
1/*
2 Copyright 2016 Statoil ASA.
3 Copyright 2016 SINTEF ICT, Applied Mathematics.
4
5 This file is part of the Open Porous Media project (OPM).
6
7 OPM is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 OPM is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with OPM. If not, see <http://www.gnu.org/licenses/>.
19*/
20
21#ifndef OPM_CONNECTIVITYGRAPH_HEADER_INCLUDED
22#define OPM_CONNECTIVITYGRAPH_HEADER_INCLUDED
23
24#include <vector>
25
26namespace Opm
27{
28namespace FlowDiagnostics
29{
31 {
32 public:
39 ConnectivityGraph(const int num_cells,
40 std::vector<int> connection_to_cell);
41
42 struct CellPair
43 {
44 int first;
45 int second;
46 };
47
48 using SizeType = std::vector<int>::size_type;
49
52
54
55 private:
56 SizeType numCells_;
57 std::vector<int> connCells_;
58 };
59
60} // namespace FlowDiagnostics
61} // namespace Opm
62
63#endif // OPM_CONNECTIVITYGRAPH_HEADER_INCLUDED
Definition: ConnectivityGraph.hpp:31
std::vector< int >::size_type SizeType
Definition: ConnectivityGraph.hpp:48
CellPair connection(const SizeType i) const
ConnectivityGraph(const int num_cells, std::vector< int > connection_to_cell)
Definition: A.hpp:4
Definition: ConnectivityGraph.hpp:43
int first
Definition: ConnectivityGraph.hpp:44
int second
Definition: ConnectivityGraph.hpp:45