t8
1.2.0
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
|
TODO: document this file. More...
Go to the source code of this file.
Functions | |
void | t8_cmesh_partition (t8_cmesh_t cmesh, sc_MPI_Comm comm) |
Given a cmesh which is to be partitioned, execute the partition task. More... | |
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. More... | |
void | t8_cmesh_gather_treecount (t8_cmesh_t cmesh, sc_MPI_Comm comm) |
Create the offset array for a partitioned cmesh. More... | |
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 cmesh is committed. More... | |
void | t8_cmesh_offset_print (t8_cmesh_t cmesh, sc_MPI_Comm comm) |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
TODO: document this file.
void t8_cmesh_gather_treecount | ( | t8_cmesh_t | cmesh, |
sc_MPI_Comm | comm | ||
) |
Create the offset array for a partitioned cmesh.
This function is collective.
[in,out] | cmesh | The cmesh whose array should be created. Must be partitioned and committed. |
[in] | comm | Mpi communicator used to create the offset array. |
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 cmesh is committed.
[in,out] | cmesh | The cmesh whose array should be created. Must be partitioned and first and last local tree as well as the total number of tree must be set. |
[in] | comm | Mpi communicator used to create the offset array. |
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.
This function is collective.
[in,out] | cmesh | The cmesh whose num_trees_per_eclass values should be created. Must be partitioned and committed. |
[in] | comm | Mpi communicator used to create the offset array. |
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.
[in] | proc | The processor that should get all trees. |
[in] | comm | The communicator to use. |
[in] | num_trees | The number of global trees in the partition. |
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.
The last process does not send any trees.
[in] | cmesh | A cmesh that is committed and partitioned. |
[in] | comm | A valid MPI communicator for cmesh. |
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.
The last process does not send any trees.
[in] | cmesh | A cmesh that is committed and partitioned. |
[in] | comm | A valid MPI communicator for cmesh. |
[in] | percent | The percentage of trees that this process should send to the next one. Must satisfy 0 <= percent <= 100 and be the same on each process. |
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.
The use of this function is only reasonable for debugging.
[in] | comm | The communicator to use. |
[in] | num_trees | The number of global trees in the partition. |
[in] | shared | If true than there will be shared trees in the generated partition table. |
[in] | seed | A seed to be used for the random number generator. If zero, a random seed is choosen. seed has to be the same on each process. |
void t8_cmesh_partition | ( | t8_cmesh_t | cmesh, |
sc_MPI_Comm | comm | ||
) |
Given a cmesh which is to be partitioned, execute the partition task.
This includes partitioning by uniform level and partitioning from a second cmesh
[in,out] | cmesh | The cmesh to be partitioned |
[in] | comm | The MPI communicator This function is usually called within t8_cmesh_commit |