36#include <sc_refcount.h>
42typedef enum p8est_wrap_flags
45 P8EST_WRAP_REFINE = 0x01,
46 P8EST_WRAP_COARSEN = 0x02
107 uint8_t *flags, *temp_flags;
192 int initial_level,
int hollow,
236p8est_wrap_t *p8est_wrap_new_rotwrap (sc_MPI_Comm mpicomm,
239 int bx,
int by,
int bz,
240 int px,
int py,
int pz,
286 int partition_for_coarsening);
368 unchanged_old_first);
394 double upperright[3];
406#define P8EST_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
p8est_connect_type_t
Characterize a type of adjacency.
Definition: p8est_connectivity.h:119
Interface routines with extended capabilities.
void(* p8est_replace_t)(p8est_t *p8est, p4est_topidx_t which_tree, int num_outgoing, p8est_quadrant_t *outgoing[], int num_incoming, p8est_quadrant_t *incoming[])
Callback function prototype to replace one set of quadrants with another.
Definition: p8est_extended.h:114
p8est_wrap_t * p8est_wrap_new_conn(sc_MPI_Comm mpicomm, p8est_connectivity_t *conn, int initial_level)
Create a p8est wrapper from a given connectivity structure.
p8est_wrap_t * p8est_wrap_new_params(sc_MPI_Comm mpicomm, p8est_connectivity_t *conn, int initial_level, p8est_wrap_params_t *params)
Create a p8est wrapper from a given connectivity structure.
p8est_wrap_t * p8est_wrap_new_ext(sc_MPI_Comm mpicomm, p8est_connectivity_t *conn, int initial_level, int hollow, p8est_connect_type_t btype, p8est_replace_t replace_fn, void *user_pointer)
Create a p8est wrapper from a given connectivity structure.
void p8est_wrap_complete(p8est_wrap_t *pp)
Free memory for the intermediate mesh.
void p8est_wrap_set_hollow(p8est_wrap_t *pp, int hollow)
Change hollow status of the wrap.
void p8est_wrap_set_partitioning(p8est_wrap_t *pp, int partition_for_coarsening)
Set a parameter that ensures future partitions allow one level of coarsening.
int p8est_wrap_adapt(p8est_wrap_t *pp)
Call p8est_refine, coarsen, and balance to update pp->p8est.
p8est_mesh_t * p8est_wrap_get_mesh(p8est_wrap_t *pp)
Return the appropriate mesh structure.
void p8est_wrap_mark_coarsen(p8est_wrap_t *pp, p4est_topidx_t which_tree, p4est_locidx_t which_quad)
Mark a local element for coarsening.
void p8est_wrap_mark_refine(p8est_wrap_t *pp, p4est_topidx_t which_tree, p4est_locidx_t which_quad)
Mark a local element for refinement.
p8est_wrap_t * p8est_wrap_new_world(int initial_level)
Passes sc_MPI_COMM_WORLD to p8est_wrap_new_unitcube.
p8est_wrap_t * p8est_wrap_new_p8est(p8est_t *p8est, int hollow, p8est_connect_type_t btype, p8est_replace_t replace_fn, void *user_pointer)
Create a wrapper for a given p8est structure.
p8est_wrap_t * p8est_wrap_new_p8est_params(p8est_t *p8est, p8est_wrap_params_t *params)
Create a wrapper for a given p8est structure.
p8est_wrap_t * p8est_wrap_new_copy(p8est_wrap_t *source, size_t data_size, p8est_replace_t replace_fn, void *user_pointer)
Create a p8est wrapper from an existing one.
int p8est_wrap_partition(p8est_wrap_t *pp, int weight_exponent, p4est_locidx_t *unchanged_first, p4est_locidx_t *unchanged_length, p4est_locidx_t *unchanged_old_first)
Call p8est_partition for equal leaf distribution.
void p8est_wrap_params_init(p8est_wrap_params_t *params)
Initialize a default p8est_wrap_params_t structure.
p8est_ghost_t * p8est_wrap_get_ghost(p8est_wrap_t *pp)
Return the appropriate ghost layer.
void p8est_wrap_set_coarsen_delay(p8est_wrap_t *pp, int coarsen_delay, int coarsen_affect)
Set a parameter that delays coarsening after adaptation.
p8est_wrap_t * p8est_wrap_new_unitcube(sc_MPI_Comm mpicomm, int initial_level)
Create p8est and auxiliary data structures.
This structure holds the 3D inter-tree connectivity information.
Definition: p8est_connectivity.h:215
quadrants that neighbor the local domain
Definition: p8est_ghost.h:41
This structure contains the different parameters of mesh creation.
Definition: p8est_mesh.h:55
This structure contains complete mesh information on a 2:1 balanced forest.
Definition: p8est_mesh.h:170
The 3D quadrant (i.e., octant) datatype.
Definition: p8est.h:68
The p8est tree datatype.
Definition: p8est.h:111
Definition: p8est_wrap.h:381
p8est_quadrant_t * quad
Current quadrant.
Definition: p8est_wrap.h:390
p8est_wrap_t * pp
Must contain a valid ghost.
Definition: p8est_wrap.h:382
p4est_locidx_t nm
Internal: mirror counter.
Definition: p8est_wrap.h:400
p4est_locidx_t local_quad
Quadrant number relative to proc.
Definition: p8est_wrap.h:387
p4est_locidx_t next_mirror_quadrant
Internal: next.
Definition: p8est_wrap.h:401
p4est_topidx_t which_tree
Current tree number.
Definition: p8est_wrap.h:385
sc_array_t * tquadrants
Current tree's quadrants.
Definition: p8est_wrap.h:389
p4est_locidx_t which_quad
Quadrant number relative to tree.
Definition: p8est_wrap.h:386
p8est_tree_t * tree
Current tree.
Definition: p8est_wrap.h:388
sc_array_t * mirrors
If not NULL, from pp's ghost.
Definition: p8est_wrap.h:399
int is_mirror
Quadrant at parallel boundary?
Definition: p8est_wrap.h:398
This structure contains the different parameters of wrap creation.
Definition: p8est_wrap.h:54
int partition_for_coarsening
If true, the partition is modified to allow one level of coarsening when calling p8est_wrap_partition...
Definition: p8est_wrap.h:74
int coarsen_affect
Boolean: If true, we delay coarsening not only after refinement, but also between subsequent coarseni...
Definition: p8est_wrap.h:70
p8est_mesh_params_t mesh_params
Parameters for mesh creation.
Definition: p8est_wrap.h:57
int hollow
Do not allocate flags, ghost, and mesh members.
Definition: p8est_wrap.h:55
p8est_replace_t replace_fn
This member may be removed soon.
Definition: p8est_wrap.h:60
void * user_pointer
Set the user pointer in p8est_wrap_t.
Definition: p8est_wrap.h:78
int coarsen_delay
Non-negative integer telling how many adaptations to wait before any given quadrant may be coarsened ...
Definition: p8est_wrap.h:66
Definition: p8est_wrap.h:85
p8est_t * p4est
p4est->user_pointer is used internally
Definition: p8est_wrap.h:103
sc_refcount_t conn_rc
This reference counter is a workaround for internal use only.
Definition: p8est_wrap.h:94
The p8est forest datatype.
Definition: p8est.h:132