p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
Data Fields
p4est_connectivity Struct Reference

This structure holds the 2D inter-tree connectivity information. More...

#include <p4est_connectivity.h>

Data Fields

p4est_topidx_t num_vertices
 the number of vertices that define the embedding of the forest (not the topology)
 
p4est_topidx_t num_trees
 the number of trees
 
p4est_topidx_t num_corners
 the number of corners that help define topology
 
double * vertices
 an array of size (3 * num_vertices)
 
p4est_topidx_ttree_to_vertex
 embed each tree into $R^3$ for e.g. More...
 
size_t tree_attr_bytes
 bytes per tree in tree_to_attr
 
char * tree_to_attr
 not touched by p4est
 
p4est_topidx_ttree_to_tree
 (4 * num_trees) neighbors across faces
 
int8_t * tree_to_face
 (4 * num_trees) face to face+orientation (see description)
 
p4est_topidx_ttree_to_corner
 (4 * num_trees) or NULL (see description)
 
p4est_topidx_tctt_offset
 corner to offset in corner_to_tree and corner_to_corner
 
p4est_topidx_tcorner_to_tree
 list of trees that meet at a corner
 
int8_t * corner_to_corner
 list of tree-corners that meet at a corner
 

Detailed Description

This structure holds the 2D inter-tree connectivity information.

Identification of arbitrary faces and corners is possible.

The arrays tree_to_* are stored in z ordering. For corners the order wrt. yx is 00 01 10 11. For faces the order is given by the normal directions -x +x -y +y. Each face has a natural direction by increasing face corner number. Face connections are allocated [0][0]..[0][3]..[num_trees-1][0]..[num_trees-1][3]. If a face is on the physical boundary it must connect to itself.

The values for tree_to_face are 0..7 where ttf % 4 gives the face number and ttf / 4 the face orientation code. The orientation is 0 for faces that are mutually direction-aligned and 1 for faces that are running in opposite directions.

It is valid to specify num_vertices as 0. In this case vertices and tree_to_vertex are set to NULL. Otherwise the vertex coordinates are stored in the array vertices as [0][0]..[0][2]..[num_vertices-1][0]..[num_vertices-1][2]. Vertex coordinates are optional and not used for inferring topology.

The corners are stored when they connect trees that are not already face neighbors at that specific corner. In this case tree_to_corner indexes into ctt_offset. Otherwise the tree_to_corner entry must be -1 and this corner is ignored. If num_corners == 0, tree_to_corner and corner_to_* arrays are set to NULL.

The arrays corner_to_* store a variable number of entries per corner. For corner c these are at position [ctt_offset[c]]..[ctt_offset[c+1]-1]. Their number for corner c is ctt_offset[c+1] - ctt_offset[c]. The entries encode all trees adjacent to corner c. The size of the corner_to_* arrays is num_ctt = ctt_offset[num_corners].

The *_to_attr arrays may have arbitrary contents defined by the user. We do not interpret them.

Note
If a connectivity implies natural connections between trees that are corner neighbors without being face neighbors, these corners shall be encoded explicitly in the connectivity.
Examples
points/generate_points2.c, simple/simple2.c, and steps/p4est_step1.c.

Field Documentation

◆ tree_to_vertex

p4est_topidx_t* p4est_connectivity::tree_to_vertex

embed each tree into $R^3$ for e.g.

visualization (see p4est_vtk.h)


The documentation for this struct was generated from the following file: