My Project
Loading...
Searching...
No Matches
partitionCells.hpp
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 <string>
24#include <utility>
25#include <vector>
26
27namespace Opm {
28
29class Well;
30
33template<class Grid>
34std::pair<std::vector<int>, int> partitionCells(const Grid& grid,
35 const std::vector<Well>& wells,
36 const std::string& method,
37 const int num_local_domains,
38 const double partition_imbalance);
39
42std::pair<std::vector<int>, int> partitionCellsFromFile(const std::string& filename, const int num_cells);
43
46std::pair<std::vector<int>, int> partitionCellsSimple(const int num_cells, const int num_domains);
47
50template<class Grid>
51std::pair<std::vector<int>, int> partitionCellsZoltan(const Grid& grid,
52 const std::vector<Well>& wells,
53 const int num_domains,
54 const double domain_imbalance);
55} // namespace Opm
56
57#endif // OPM_ASPINPARTITION_HEADER_INCLUDED
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition BlackoilPhases.hpp:27
std::pair< std::vector< int >, int > partitionCellsFromFile(const std::string &filename, const int num_cells)
Read a partitioning from file, assumed to contain one number per cell, its partition number.
Definition partitionCells.cpp:104
std::pair< std::vector< int >, int > partitionCellsSimple(const int num_cells, const int num_domains)
Trivially simple partitioner assigning partitions en bloc, consecutively by cell index.
Definition partitionCells.cpp:122
std::pair< std::vector< int >, int > partitionCells(const Grid &grid, const std::vector< Well > &wells, const std::string &method, const int num_local_domains, const double partition_imbalance)
Partitions the grid using the specified method.
Definition partitionCells.cpp:77
std::pair< std::vector< int >, int > partitionCellsZoltan(const Grid &grid, const std::vector< Well > &wells, const int num_domains, const double domain_imbalance)
Partitions the grid using the Zoltan graph partitioner.
Definition partitionCells.cpp:142