37#include <sc_refcount.h>
43typedef enum p4est_wrap_flags
46 P4EST_WRAP_REFINE = 0x01,
47 P4EST_WRAP_COARSEN = 0x02
88 uint8_t *flags, *temp_flags;
147 int initial_level,
int hollow,
174p4est_wrap_t *p4est_wrap_new_periodic (sc_MPI_Comm mpicomm,
176p4est_wrap_t *p4est_wrap_new_rotwrap (sc_MPI_Comm mpicomm,
178p4est_wrap_t *p4est_wrap_new_corner (sc_MPI_Comm mpicomm,
180p4est_wrap_t *p4est_wrap_new_pillow (sc_MPI_Comm mpicomm,
182p4est_wrap_t *p4est_wrap_new_moebius (sc_MPI_Comm mpicomm,
186p4est_wrap_t *p4est_wrap_new_disk (sc_MPI_Comm mpicomm,
int px,
int py,
189 int bx,
int by,
int px,
int py,
305 unchanged_old_first);
331 double upperright[3];
343#define P4EST_LEAF_IS_FIRST_IN_TREE(wleaf) ((wleaf)->which_quad == 0)
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
Interface routines with extended capabilities.
void(* p4est_replace_t)(p4est_t *p4est, p4est_topidx_t which_tree, int num_outgoing, p4est_quadrant_t *outgoing[], int num_incoming, p4est_quadrant_t *incoming[])
Callback function prototype to replace one set of quadrants with another.
Definition: p4est_extended.h:109
forest topology in a conventional mesh format
void p4est_wrap_mark_coarsen(p4est_wrap_t *pp, p4est_topidx_t which_tree, p4est_locidx_t which_quad)
Mark a local element for coarsening.
p4est_wrap_t * p4est_wrap_new_unitsquare(sc_MPI_Comm mpicomm, int initial_level)
Create p4est and auxiliary data structures.
p4est_mesh_t * p4est_wrap_get_mesh(p4est_wrap_t *pp)
Return the appropriate mesh structure.
p4est_wrap_t * p4est_wrap_new_ext(sc_MPI_Comm mpicomm, p4est_connectivity_t *conn, int initial_level, int hollow, p4est_connect_type_t btype, p4est_replace_t replace_fn, void *user_pointer)
Create a p4est wrapper from a given connectivity structure.
p4est_wrap_t * p4est_wrap_new_world(int initial_level)
Passes sc_MPI_COMM_WORLD to p4est_wrap_new_unitsquare.
p4est_wrap_t * p4est_wrap_new_p4est(p4est_t *p4est, int hollow, p4est_connect_type_t btype, p4est_replace_t replace_fn, void *user_pointer)
Create a wrapper for a given p4est structure.
void p4est_wrap_set_hollow(p4est_wrap_t *pp, int hollow)
Change hollow status of the wrap.
void p4est_wrap_complete(p4est_wrap_t *pp)
Free memory for the intermediate mesh.
int p4est_wrap_adapt(p4est_wrap_t *pp)
Call p4est_refine, coarsen, and balance to update pp->p4est.
p4est_wrap_t * p4est_wrap_new_conn(sc_MPI_Comm mpicomm, p4est_connectivity_t *conn, int initial_level)
Create a p4est wrapper from a given connectivity structure.
p4est_wrap_t * p4est_wrap_new_copy(p4est_wrap_t *source, size_t data_size, p4est_replace_t replace_fn, void *user_pointer)
Create a p4est wrapper from an existing one.
void p4est_wrap_mark_refine(p4est_wrap_t *pp, p4est_topidx_t which_tree, p4est_locidx_t which_quad)
Mark a local element for refinement.
p4est_ghost_t * p4est_wrap_get_ghost(p4est_wrap_t *pp)
Return the appropriate ghost layer.
void p4est_wrap_set_coarsen_delay(p4est_wrap_t *pp, int coarsen_delay, int coarsen_affect)
Set a parameter that delays coarsening after adaptation.
int p4est_wrap_partition(p4est_wrap_t *pp, int weight_exponent, p4est_locidx_t *unchanged_first, p4est_locidx_t *unchanged_length, p4est_locidx_t *unchanged_old_first)
Call p4est_partition for equal leaf distribution.
This structure holds the 2D inter-tree connectivity information.
Definition: p4est_connectivity.h:189
quadrants that neighbor the local domain
Definition: p4est_ghost.h:41
This structure contains complete mesh information on a 2:1 balanced forest.
Definition: p4est_mesh.h:101
The 2D quadrant datatype.
Definition: p4est.h:72
The p4est tree datatype.
Definition: p4est.h:115
Definition: p4est_wrap.h:318
p4est_locidx_t local_quad
Quadrant number relative to proc.
Definition: p4est_wrap.h:324
p4est_locidx_t nm
Internal: mirror counter.
Definition: p4est_wrap.h:337
p4est_locidx_t which_quad
Quadrant number relative to tree.
Definition: p4est_wrap.h:323
p4est_tree_t * tree
Current tree.
Definition: p4est_wrap.h:325
p4est_topidx_t which_tree
Current tree number.
Definition: p4est_wrap.h:322
sc_array_t * mirrors
If not NULL, from pp's ghost.
Definition: p4est_wrap.h:336
int is_mirror
Quadrant at parallel boundary?
Definition: p4est_wrap.h:335
p4est_locidx_t next_mirror_quadrant
Internal: next.
Definition: p4est_wrap.h:338
p4est_wrap_t * pp
Must contain a valid ghost.
Definition: p4est_wrap.h:319
p4est_quadrant_t * quad
Current quadrant.
Definition: p4est_wrap.h:327
sc_array_t * tquadrants
Current tree's quadrants.
Definition: p4est_wrap.h:326
Definition: p4est_wrap.h:52
p4est_t * p4est
p4est->user_pointer is used internally
Definition: p4est_wrap.h:84
int coarsen_delay
Non-negative integer tells us how many adaptations to wait before any given quadrant may be coarsened...
Definition: p4est_wrap.h:62
int coarsen_affect
Boolean: If true, we delay coarsening not only after refinement, but also between subsequent coarseni...
Definition: p4est_wrap.h:66
int hollow
If true, this wrap has NULL for ghost, mesh, and flag members.
Definition: p4est_wrap.h:58
sc_refcount_t conn_rc
This reference counter is a workaround for internal use only.
Definition: p4est_wrap.h:73
void * user_pointer
Convenience member for users.
Definition: p4est_wrap.h:54
The p4est forest datatype.
Definition: p4est.h:136