partition.h
Go to the documentation of this file.
1/*
2 Copyright 2010 SINTEF ICT, Applied Mathematics.
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_PARTITION_HEADER_INCLUDED
21#define OPM_PARTITION_HEADER_INCLUDED
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27int
28partition_unif_idx(int ndims, int nc,
29 const int *fine_d,
30 const int *coarse_d,
31 const int *idx,
32 int *p);
33
34int
35partition_compress(int n, int *p);
36
37
38int
39partition_allocate_inverse(int nc, int max_blk,
40 int **pi, int **inverse);
41
42void
43partition_deallocate_inverse(int *pi, int *inverse);
44
45void
46partition_invert(int nc, const int *p,
47 int *pi, int *inverse);
48
49void
50partition_localidx(int nblk, const int *pi, const int *inverse,
51 int *localidx);
52
53
54int
55partition_split_disconnected(int nc, int nneigh, const int *neigh,
56 int *p);
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* PARTITION_H_INLCUDED */
int partition_compress(int n, int *p)
void partition_localidx(int nblk, const int *pi, const int *inverse, int *localidx)
void partition_invert(int nc, const int *p, int *pi, int *inverse)
int partition_split_disconnected(int nc, int nneigh, const int *neigh, int *p)
int partition_unif_idx(int ndims, int nc, const int *fine_d, const int *coarse_d, const int *idx, int *p)
void partition_deallocate_inverse(int *pi, int *inverse)
int partition_allocate_inverse(int nc, int max_blk, int **pi, int **inverse)