p4est
1.1

This structure contains complete mesh information on the forest. More...
#include <p4est_mesh.h>
Data Fields  
p4est_locidx_t  local_num_quadrants 
p4est_locidx_t  ghost_num_quadrants 
p4est_topidx_t *  quad_to_tree 
tree index for each local quad, NULL by default  
int *  ghost_to_proc 
processor for each ghost quad  
p4est_locidx_t *  quad_to_quad 
one index for each of the 4 faces  
int8_t *  quad_to_face 
encodes orientation/2:1 status  
sc_array_t *  quad_to_half 
stores halfsize neighbors  
sc_array_t *  quad_level 
stores lists of perlevel quads, NULL by default  
p4est_locidx_t  local_num_corners 
p4est_locidx_t *  quad_to_corner 
sc_array_t *  corner_offset 
sc_array_t *  corner_quad 
sc_array_t *  corner_corner 
This structure contains complete mesh information on the forest.
It stores the locally relevant neighborhood, that is, all locally owned quadrants and one layer of adjacent ghost quadrants and their owners.
For each local quadrant, its tree number is stored in quad_to_tree. The quad_to_tree array is NULL by default and can be enabled using p4est_mesh_new_ext. For each ghost quadrant, its owner rank is stored in ghost_to_proc. For each level, an array of local quadrant numbers is stored in quad_level. The quad_level array is NULL by default and can be enabled using p4est_mesh_new_ext.
The quad_to_quad list stores one value for each local quadrant's face. This value is in 0..local_num_quadrants1 for local quadrants, or in local_num_quadrants + (0..ghost_num_quadrants1) for ghost quadrants. The quad_to_face list has equally many entries which are either:
The quad_to_corner list stores corner neighbors that are not face neighbors. On the inside of a tree, there is precisely one such neighbor per corner. In this case, its index is encoded as described above for quad_to_quad. The neighbor's matching corner number is always diagonally opposite.
On the inside of an intertree face, we have precisely one corner neighbor. If a corner is an intertree corner, then the number of corner neighbors may be any nonnegative number. In both cases, the quad_to_corner value is in local_num_quadrants + local_num_ghosts + [0 .. local_num_corners  1] where the offset by local quadrants and ghosts is implicitly substracted. It indexes into corner_offset, which encodes a group of corner neighbors. Each group contains the quadrant numbers encoded as usual for quad_to_quad in corner_quad, and the corner number from the neighbor as corner_corner.
Intratree corners and corners across an intertree face are implemented. Other Intertree corners are NOT IMPLEMENTED and are assigned the value 2. Corners with no diagonal neighbor at all are assigned the value 1.