290 sc_array_t * neighboring_quads,
291 sc_array_t * neighboring_encs,
292 sc_array_t * neighboring_qids);
364 int *nface,
int *nrank);
374 * mfn,
void *ghost_data);
int32_t p4est_topidx_t
Typedef for counting topological entities (trees, tree vertices).
Definition: p4est_base.h:93
int32_t p4est_locidx_t
Typedef for processor-local indexing of quadrants and nodes.
Definition: p4est_base.h:106
p4est_connect_type_t
Characterize a type of adjacency.
Definition: p4est_connectivity.h:113
passing quadrants and data to neighboring processes
p4est_locidx_t p4est_mesh_get_neighbors(p4est_t *p4est, p4est_ghost_t *ghost, p4est_mesh_t *mesh, p4est_locidx_t curr_quad_id, p4est_locidx_t direction, sc_array_t *neighboring_quads, sc_array_t *neighboring_encs, sc_array_t *neighboring_qids)
Lookup neighboring quads of quadrant in a specific direction.
p4est_quadrant_t * p4est_mesh_quadrant_cumulative(p4est_t *p4est, p4est_mesh_t *mesh, p4est_locidx_t cumulative_id, p4est_topidx_t *which_tree, p4est_locidx_t *quadrant_id)
Find a quadrant based on its cumulative number in the local forest.
void p4est_mesh_params_init(p4est_mesh_params_t *params)
Initialize a default p4est_mesh_params_t structure.
void * p4est_mesh_face_neighbor_data(p4est_mesh_face_neighbor_t *mfn, void *ghost_data)
Get the user data for the current face neighbor.
p4est_mesh_t * p4est_mesh_new_params(p4est_t *p4est, p4est_ghost_t *ghost, p4est_mesh_params_t *params)
Create a new mesh.
void p4est_mesh_face_neighbor_init(p4est_mesh_face_neighbor_t *mfn, p4est_t *p4est, p4est_ghost_t *ghost, p4est_mesh_t *mesh, p4est_topidx_t which_tree, p4est_quadrant_t *quadrant)
Initialize a mesh neighbor iterator by quadrant pointer.
void p4est_mesh_destroy(p4est_mesh_t *mesh)
Destroy a p4est_mesh structure.
void p4est_mesh_face_neighbor_init2(p4est_mesh_face_neighbor_t *mfn, p4est_t *p4est, p4est_ghost_t *ghost, p4est_mesh_t *mesh, p4est_topidx_t which_tree, p4est_locidx_t quadrant_id)
Initialize a mesh neighbor iterator by quadrant index.
p4est_mesh_t * p4est_mesh_new(p4est_t *p4est, p4est_ghost_t *ghost, p4est_connect_type_t btype)
Create a p4est_mesh structure.
size_t p4est_mesh_memory_used(p4est_mesh_t *mesh)
Calculate the memory usage of the mesh structure.
p4est_quadrant_t * p4est_mesh_face_neighbor_next(p4est_mesh_face_neighbor_t *mfn, p4est_topidx_t *ntree, p4est_locidx_t *nquad, int *nface, int *nrank)
Move the iterator forward to loop around neighbors of the quadrant.
p4est_quadrant_t * p4est_mesh_get_quadrant(p4est_t *p4est, p4est_mesh_t *mesh, p4est_locidx_t qid)
Access a process-local quadrant inside a forest.
quadrants that neighbor the local domain
Definition: p4est_ghost.h:41
This structure can be used as the status of a face neighbor iterator.
Definition: p4est_mesh.h:169
p4est_locidx_t quadrant_code
4 * (quadrant_id + tree_offset)
Definition: p4est_mesh.h:178
p4est_topidx_t which_tree
the current tree index
Definition: p4est_mesh.h:176
p4est_t * p4est
the forest
Definition: p4est_mesh.h:171
int subface
Hanging neighbor number in 0..1.
Definition: p4est_mesh.h:182
p4est_mesh_t * mesh
a mesh derived from the forest
Definition: p4est_mesh.h:173
p4est_ghost_t * ghost
the ghost layer of the forest
Definition: p4est_mesh.h:172
p4est_locidx_t quadrant_id
tree-local quadrant index
Definition: p4est_mesh.h:177
p4est_locidx_t current_qtq
track index of current neighboring quadrant
Definition: p4est_mesh.h:185
int face
Face number in 0..3.
Definition: p4est_mesh.h:181
This structure contains the different parameters of mesh creation.
Definition: p4est_mesh.h:55
p4est_connect_type_t btype
Flag indicating the connection types (face, edge, corner) stored in the mesh.
Definition: p4est_mesh.h:62
int compute_tree_index
Boolean to decide whether to allocate and compute the quad_to_tree list.
Definition: p4est_mesh.h:56
int compute_level_lists
Boolean to decide whether to compute the level lists in quad_level.
Definition: p4est_mesh.h:59
This structure contains complete mesh information on a 2:1 balanced forest.
Definition: p4est_mesh.h:130
sc_array_t * corner_corner
and this one too (type int8_t)
Definition: p4est_mesh.h:156
p4est_locidx_t local_num_quadrants
number of process-local quadrants
Definition: p4est_mesh.h:131
p4est_locidx_t * quad_to_quad
one index for each of the 4 faces
Definition: p4est_mesh.h:139
sc_array_t * quad_level
Stores lists of per-level quads.
Definition: p4est_mesh.h:143
p4est_mesh_params_t params
parameters the mesh was created with, e.g.
Definition: p4est_mesh.h:158
sc_array_t * quad_to_half
stores half-size neighbors
Definition: p4est_mesh.h:141
p4est_topidx_t * quad_to_tree
tree index for each local quad.
Definition: p4est_mesh.h:134
sc_array_t * corner_offset
local_num_corners + 1 entries
Definition: p4est_mesh.h:154
sc_array_t * corner_quad
corner_offset indexes into this
Definition: p4est_mesh.h:155
p4est_locidx_t * quad_to_corner
4 indices for each local quad
Definition: p4est_mesh.h:153
int8_t * quad_to_face
encodes orientation/2:1 status
Definition: p4est_mesh.h:140
p4est_locidx_t ghost_num_quadrants
number of ghost-layer quadrants
Definition: p4est_mesh.h:132
int * ghost_to_proc
processor for each ghost quad
Definition: p4est_mesh.h:137
p4est_locidx_t local_num_corners
tree-boundary corners
Definition: p4est_mesh.h:152
The 2D quadrant datatype.
Definition: p4est.h:72
The p4est forest datatype.
Definition: p4est.h:136