107 double vertices[24]);
288extern void *P2EST_DATA_UNINITIALIZED;
291#define P2EST_QUADRANT_INIT(q) \
292 ((void) memset ((q), -1, sizeof (p2est_quadrant_t)))
339 double *top_vertices,
340 double height[3],
int min_zlevel,
397 int refine_recursive,
420 int refine_recursive,
434 int coarsen_recursive,
448 int coarsen_recursive,
465 P6EST_COMM_PARTITION = 1,
489void p6est_partition_to_p4est_partition (
p6est_t *
p6est,
493 num_columns_in_proc);
494void p4est_partition_to_p6est_partition (
p6est_t *
p6est,
546 size_t data_size,
int load_data,
553p2est_quadrant_array_index (sc_array_t * array,
size_t it)
556 P4EST_ASSERT (it < array->elem_count);
564p2est_quadrant_array_push (sc_array_t * array)
578p2est_quadrant_mempool_alloc (sc_mempool_t * mempool)
588p2est_quadrant_list_pop (sc_list_t * list)
593#define P6EST_COLUMN_GET_RANGE(q,f,l) \
595 *(f) = (size_t) (q)->p.piggy3.local_num; \
596 *(l) = *(f) + (size_t) (q)->p.piggy3.which_tree; \
599#define P6EST_COLUMN_SET_RANGE(q,f,l) \
601 (q)->p.piggy3.local_num = (p4est_locidx_t) (f); \
602 (q)->p.piggy3.which_tree = (p4est_topidx_t) ((l) - (f)); \
617 if (init_fn != NULL) {
618 init_fn (
p6est, which_tree, column, layer);
The top-level 2D p4est interface.
int32_t p4est_qcoord_t
Typedef for quadrant coordinates.
Definition: p4est_base.h:81
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
int64_t p4est_gloidx_t
Typedef for globally unique indexing of quadrants.
Definition: p4est_base.h:118
int(* p6est_refine_column_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column)
Callback function prototype to decide whether to horizontally refine a column, i.e....
Definition: p6est.h:249
void(* p6est_init_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layer)
Callback function prototype to initialize the layers's user data.
Definition: p6est.h:201
p6est_t * p6est_new_from_p4est(p4est_t *p4est, double *top_vertices, double height[3], int min_zlevel, size_t data_size, p6est_init_t init_fn, void *user_pointer)
Create a new forest from an already created p4est that represents columns.
void p6est_balance(p6est_t *p6est, p8est_connect_type_t btype, p6est_init_t init_fn)
Balance a forest.
struct p6est_connectivity p6est_connectivity_t
This structure holds the 2D+1D inter-tree connectivity information.
void p6est_connectivity_destroy(p6est_connectivity_t *conn)
Destroy a p6est_connectivity structure.
struct p2est_quadrant p2est_quadrant_t
A 1D quadrant datatype: this is used to encode a "layer" of a column in the 2D+1D AMR scheme.
p4est_gloidx_t p6est_partition(p6est_t *p6est, p6est_weight_t weight_fn)
Equally partition the forest.
void p6est_tree_get_vertices(p6est_connectivity_t *conn, p4est_topidx_t which_tree, double vertices[24])
Get the vertices of the corners of a tree.
struct p6est p6est_t
The p6est forest datatype.
void p6est_destroy(p6est_t *p6est)
Destroy a p6est.
void p6est_refine_layers(p6est_t *p6est, int refine_recursive, p6est_refine_layer_t refine_fn, p6est_init_t init_fn)
Refine the layers within the columns of a sheet.
p6est_t * p6est_new(sc_MPI_Comm mpicomm, p6est_connectivity_t *connectivity, size_t data_size, p6est_init_t init_fn, void *user_pointer)
Create a new forest.
p6est_t * p6est_copy(p6est_t *input, int copy_data)
Make a deep copy of a p6est.
p6est_t * p6est_load(const char *filename, sc_MPI_Comm mpicomm, size_t data_size, int load_data, void *user_pointer, p6est_connectivity_t **connectivity)
Load the complete connectivity/p6est structure from disk.
void p6est_save(const char *filename, p6est_t *p6est, int save_data)
Save the complete connectivity/p6est data to disk.
p6est_connectivity_t * p6est_connectivity_new(p4est_connectivity_t *conn4, double *top_vertices, double height[3])
Create a p6est_connectivity_t from a p4est_connectivity_t.
int(* p6est_weight_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layer)
Callback function prototype to calculate weights for partitioning.
Definition: p6est.h:283
void p6est_coarsen_columns(p6est_t *p6est, int coarsen_recursive, p6est_coarsen_column_t coarsen_fn, p6est_init_t init_fn)
Coarsen the columns of a sheet.
int(* p6est_coarsen_column_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *columns[])
Callback function prototype to decide for horizontal coarsening.
Definition: p6est.h:266
void(* p6est_replace_t)(p6est_t *p6est, p4est_topidx_t which_tree, int num_outcolumns, int num_outlayers, p4est_quadrant_t *outcolumns[], p2est_quadrant_t *outlayers[], int num_incolumns, int num_inlayers, p4est_quadrant_t *incolumns[], p2est_quadrant_t *inlayers[])
Callback function prototype to transfer information from outgoing layers to incoming layers.
Definition: p6est.h:234
unsigned p6est_checksum(p6est_t *p6est)
Compute the checksum for a forest.
void p6est_coarsen_layers(p6est_t *p6est, int coarsen_recursive, p6est_coarsen_layer_t coarsen_fn, p6est_init_t init_fn)
Coarsen the layers of a sheet.
void p6est_reset_data(p6est_t *p6est, size_t data_size, p6est_init_t init_fn, void *user_pointer)
Reset user pointer and element data.
void p6est_refine_columns(p6est_t *p6est, int refine_recursive, p6est_refine_column_t refine_fn, p6est_init_t init_fn)
Refine the columns of a sheet.
int(* p6est_refine_layer_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layer)
Callback function prototype to decide whether to vertically refine a layer.
Definition: p6est.h:257
int(* p6est_coarsen_layer_t)(p6est_t *p6est, p4est_topidx_t which_tree, p4est_quadrant_t *column, p2est_quadrant_t *layers[])
Callback function prototype to decide for vertical coarsening.
Definition: p6est.h:274
#define P2EST_QUADRANT_INIT(q)
set statically allocated quadrant to defined values
Definition: p6est.h:291
void p6est_qcoord_to_vertex(p6est_connectivity_t *connectivity, p4est_topidx_t treeid, p4est_qcoord_t x, p4est_qcoord_t y, p4est_qcoord_t z, double vxyz[3])
Transform a quadrant coordinate into the space spanned by tree vertices.
The connectivity defines the coarse topology of the forest.
p8est_connect_type_t
Characterize a type of adjacency.
Definition: p8est_connectivity.h:119
A 1D quadrant datatype: this is used to encode a "layer" of a column in the 2D+1D AMR scheme.
Definition: p6est.h:127
int8_t level
level of refinement
Definition: p6est.h:129
union p2est_quadrant::p6est_quadrant_data p
a union of additional data attached to a layer
int16_t pad16
padding
Definition: p6est.h:131
int8_t pad8
padding
Definition: p6est.h:130
p4est_qcoord_t z
vertical coordinate
Definition: p6est.h:128
This structure holds the 2D inter-tree connectivity information.
Definition: p4est_connectivity.h:190
The 2D quadrant datatype.
Definition: p4est.h:72
The p4est forest datatype.
Definition: p4est.h:136
This structure holds the 2D+1D inter-tree connectivity information.
Definition: p6est.h:65
p4est_connectivity_t * conn4
the 2D connecitvity; owned; vertices interpreted as the vertices of the bottom of the sheet
Definition: p6est.h:66
double * top_vertices
if NULL, uniform vertical profile, otherwise the vertices of the top of the sheet: should be the same...
Definition: p6est.h:69
double height[3]
if top_vertices == NULL, this gives the offset from the bottom of the sheet to the top
Definition: p6est.h:73
The p6est forest datatype.
Definition: p6est.h:165
void * user_pointer
convenience pointer for users, never touched by p4est
Definition: p6est.h:173
sc_MPI_Comm mpicomm
MPI communicator.
Definition: p6est.h:166
sc_mempool_t * user_data_pool
memory allocator for user data
Definition: p6est.h:182
int mpirank
this process's MPI rank
Definition: p6est.h:168
p4est_t * columns
2D description of column layout built from connectivity.
Definition: p6est.h:176
p6est_connectivity_t * connectivity
topology of sheet, not owned.
Definition: p6est.h:175
size_t data_size
size of per-quadrant p.user_data (see p2est_quadrant_t::p2est_quadrant_data::user_data)
Definition: p6est.h:171
int mpisize
number of MPI processes
Definition: p6est.h:167
p4est_gloidx_t * global_first_layer
first global quadrant index for each process and 1 beyond
Definition: p6est.h:187
p4est_qcoord_t root_len
height of the domain
Definition: p6est.h:189
int mpicomm_owned
whether this communicator is owned by the forest
Definition: p6est.h:169
sc_mempool_t * layer_pool
memory allocator for temporary layers
Definition: p6est.h:185
sc_array_t * layers
single array that stores p2est_quadrant_t layers within columns
Definition: p6est.h:180
struct p2est_quadrant::p6est_quadrant_data::@14 piggy3
of ghost layers, store the tree and index in the owner's numbering
p4est_topidx_t which_tree
the tree containing the quadrant
Definition: p6est.h:137
struct p2est_quadrant::p6est_quadrant_data::@13 piggy2
of transformed layers, store the original tree and the target tree
struct p2est_quadrant::p6est_quadrant_data::@12 piggy1
of ghost layer, store the tree and owner rank
void * user_data
never changed by p4est
Definition: p6est.h:134
long user_long
never changed by p4est
Definition: p6est.h:135
int user_int
never changed by p4est
Definition: p6est.h:136