Struct t8_forest

Struct Documentation

struct t8_forest

This structure is private to the implementation.

Public Members

t8_refcount_t rc

Reference counter.

int set_level

Level to use in new construction.

int set_for_coarsening

Change partition to allow for one round of coarsening

sc_MPI_Comm mpicomm

MPI communicator to use.

t8_cmesh_t cmesh

Coarse mesh to use.

const t8_scheme_c *scheme

Scheme for element types.

int maxlevel

The maximum allowed refinement level for elements in this forest.

int maxlevel_existing

If >= 0, the maximum occurring refinemnent level of a forest element.

int do_dup

Communicator shall be duped.

int dimension

Dimension inferred from cmesh.

int incomplete_trees

Flag to check whether the forest has (potential) incomplete trees. A tree is incomplete if an element has been removed from it. Once an element got removed, the flag sets to 1 (true) and stays. For a committed forest this flag is either true on all ranks or false on all ranks.

t8_forest_t set_from

Temporarily store source forest.

t8_forest_from_t from_method

Method to derive from set_from.

t8_forest_adapt_t set_adapt_fn

refinement and coarsen function. Called when from_method is set to T8_FOREST_FROM_ADAPT.

int set_adapt_recursive

Flag to decide whether coarsen and refine are carried out recursive

int set_balance

Flag to decide whether to forest will be balance in t8_forest_commit. See t8_forest_set_balance. If 0, no balance. If 1 balance with repartitioning, if 2 balance without repartitioning,

See also

t8_forest_balance

int do_ghost

If True, a ghost layer will be created when the forest is committed.

t8_ghost_type_t ghost_type

If a ghost layer will be created, the type of neighbors that count as ghost.

int ghost_algorithm

Controls the algorithm used for ghost. 1 = balanced only. 2 = also unbalanced 3 = top-down search and unbalanced.

void *user_data

Pointer for arbitrary user data.

See also

t8_forest_set_user_data.

void (*user_function)()

Pointer for arbitrary user function.

See also

t8_forest_set_user_function.

void *t8code_data

Pointer for arbitrary data that is used internally.

int committed

t8_forest_commit called?

int mpisize

Number of MPI processes.

int mpirank

Number of this MPI process.

t8_gloidx_t first_local_tree

The global index of the first local tree on this process. If first_local_tree is larger than last_local_tree then this processor/forest is empty. See https://github.com/DLR-AMR/t8code/wiki/Tree-indexing

t8_gloidx_t last_local_tree

The global index of the last local tree on this process. -1 if this processor is empty.

t8_gloidx_t global_num_trees

The total number of global trees.

sc_array_t *trees

The array of trees.

t8_forest_ghost_t ghosts

If not NULL, the ghost elements.

See also

t8_forest_ghost.h

t8_shmem_array_t element_offsets

If partitioned, for each process the global index of its first element. Since it is memory consuming, it is usually only constructed when needed and otherwise unallocated.

t8_shmem_array_t global_first_desc

If partitioned, for each process the linear id (at maxlevel) of its first element’s first descendant. t8_element_set_linear_id. Stores 0 for empty processes. Since it is memory consuming, it is usually only constructed when needed and otherwise unallocated.

t8_shmem_array_t tree_offsets

If partitioned for each process the global index of its first local tree or -(first local tree) - 1 if the first tree on that process is shared. Since this is memory consuming we only construct it when needed. This array follows the same logic as tree_offsets in t8_cmesh_t

t8_locidx_t local_num_leaf_elements

Number of leaf elements on this processor.

t8_gloidx_t global_num_leaf_elements

Number of leaf elements on all processors.

t8_profile_t *profile

If not NULL, runtimes and statistics about forest_commit are stored here.

sc_statinfo_t stats[17]

The SC profiling stats of the forest.

int stats_computed

Switch indicating whether the profiling stats have been compute (1) or not (0)