partitionCells.hpp
Go to the documentation of this file.
1/*
2 Copyright 2021 Total SE
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_ASPINPARTITION_HEADER_INCLUDED
21#define OPM_ASPINPARTITION_HEADER_INCLUDED
22
23#include <functional>
24#include <set>
25#include <string>
26#include <utility>
27#include <vector>
28
29namespace Opm {
30
31class Well;
32
33} // namespace Opm
34
35namespace Opm {
36
40template <typename Element>
42{
45 double domain_imbalance{1.03};
46
49 std::function<int(const Element&)> index;
50
58 std::function<int(int)> local_to_global;
59};
60
90template <class GridView, class Element>
91std::pair<std::vector<int>, int>
92partitionCells(const std::string& method,
93 const int num_local_domains,
94 const GridView& grid_view,
95 const std::vector<Well>& wells,
96 const std::unordered_map<std::string, std::set<int>>& possibleFutureConnections,
97 const ZoltanPartitioningControl<Element>& zoltan_ctrl);
98
101std::pair<std::vector<int>, int> partitionCellsFromFile(const std::string& filename, const int num_cells);
102
105std::pair<std::vector<int>, int> partitionCellsSimple(const int num_cells, const int num_domains);
106
107} // namespace Opm
108
109#endif // OPM_ASPINPARTITION_HEADER_INCLUDED
Definition: blackoilboundaryratevector.hh:37
std::pair< std::vector< int >, int > partitionCellsFromFile(const std::string &filename, const int num_cells)
std::pair< std::vector< int >, int > partitionCellsSimple(const int num_cells, const int num_domains)
std::pair< std::vector< int >, int > partitionCells(const std::string &method, const int num_local_domains, const GridView &grid_view, const std::vector< Well > &wells, const std::unordered_map< std::string, std::set< int > > &possibleFutureConnections, const ZoltanPartitioningControl< Element > &zoltan_ctrl)
Definition: partitionCells.hpp:42
double domain_imbalance
Definition: partitionCells.hpp:45
std::function< int(int)> local_to_global
Definition: partitionCells.hpp:58
std::function< int(const Element &)> index
Definition: partitionCells.hpp:49