t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
t8_cmesh_partition.h
Go to the documentation of this file.
1 /*
2  This file is part of t8code.
3  t8code is a C library to manage a collection (a forest) of multiple
4  connected adaptive space-trees of general element classes in parallel.
5 
6  Copyright (C) 2015 the developers
7 
8  t8code is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  t8code is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with t8code; if not, write to the Free Software Foundation, Inc.,
20  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22 
28 #ifndef T8_CMESH_PARTITION_H
29 #define T8_CMESH_PARTITION_H
30 
31 #include <t8.h>
32 #include <t8_cmesh.h>
33 #include "t8_cmesh_types.h"
34 
35 T8_EXTERN_C_BEGIN ();
36 
42 void
43 t8_cmesh_partition (t8_cmesh_t cmesh, sc_MPI_Comm comm);
44 
53 void
54 t8_cmesh_gather_trees_per_eclass (t8_cmesh_t cmesh, sc_MPI_Comm comm);
55 
63 void
64 t8_cmesh_gather_treecount (t8_cmesh_t cmesh, sc_MPI_Comm comm);
65 
77 void
78 t8_cmesh_gather_treecount_nocommit (t8_cmesh_t cmesh, sc_MPI_Comm comm);
79 
80 /* TODO: document, only for debug */
81 void
82 t8_cmesh_offset_print (t8_cmesh_t cmesh, sc_MPI_Comm comm);
83 
94 t8_cmesh_offset_concentrate (int proc, sc_MPI_Comm comm, t8_gloidx_t num_trees);
95 
109 t8_cmesh_offset_random (sc_MPI_Comm comm, t8_gloidx_t num_trees, int shared, unsigned seed);
110 
120 t8_cmesh_offset_half (t8_cmesh_t cmesh, sc_MPI_Comm comm);
121 
134 t8_cmesh_offset_percent (t8_cmesh_t cmesh, sc_MPI_Comm comm, int percent);
135 
136 T8_EXTERN_C_END ();
137 
138 #endif /* !T8_CMESH_PARTITION_H */
This structure holds the connectivity data of the coarse mesh.
Definition: t8_cmesh_types.h:88
Shared memory array structure.
Definition: t8_shmem.c:35
This is the administrative header file for t8code.
int64_t t8_gloidx_t
A type for global indexing that holds really big numbers.
Definition: t8.h:100
We define the coarse mesh of trees in this file.
void t8_cmesh_gather_treecount_nocommit(t8_cmesh_t cmesh, sc_MPI_Comm comm)
Perform the same task as t8_cmesh_gather_treecount, but do not perform the debugging check whether cm...
Definition: t8_cmesh_partition.cxx:245
t8_shmem_array_t t8_cmesh_offset_random(sc_MPI_Comm comm, t8_gloidx_t num_trees, int shared, unsigned seed)
Create a random partition table.
Definition: t8_cmesh_partition.cxx:1677
t8_shmem_array_t t8_cmesh_offset_concentrate(int proc, sc_MPI_Comm comm, t8_gloidx_t num_trees)
Create a valid partition table that concentrates all trees at a given process.
Definition: t8_cmesh_partition.cxx:1635
t8_shmem_array_t t8_cmesh_offset_half(t8_cmesh_t cmesh, sc_MPI_Comm comm)
Create a repartition array, where each process sends half of its trees to the next process.
Definition: t8_cmesh_partition.cxx:1825
t8_shmem_array_t t8_cmesh_offset_percent(t8_cmesh_t cmesh, sc_MPI_Comm comm, int percent)
Create a repartition array, where each process sends a percentage of its trees to the next process.
Definition: t8_cmesh_partition.cxx:1760
void t8_cmesh_gather_treecount(t8_cmesh_t cmesh, sc_MPI_Comm comm)
Create the offset array for a partitioned cmesh.
Definition: t8_cmesh_partition.cxx:237
void t8_cmesh_gather_trees_per_eclass(t8_cmesh_t cmesh, sc_MPI_Comm comm)
From num_local_trees_per_eclass compute num_trees_per_eclass.
Definition: t8_cmesh_partition.cxx:125
void t8_cmesh_partition(t8_cmesh_t cmesh, sc_MPI_Comm comm)
Given a cmesh which is to be partitioned, execute the partition task.
Definition: t8_cmesh_partition.cxx:1534
We define here the datatypes needed for internal cmesh routines.