15#ifndef dealii_p4est_wrappers_h
16#define dealii_p4est_wrappers_h
22#ifdef DEAL_II_WITH_P4EST
23# include <p4est_bits.h>
24# include <p4est_communication.h>
25# include <p4est_extended.h>
26# include <p4est_ghost.h>
27# include <p4est_iterate.h>
28# include <p4est_search.h>
29# include <p4est_vtk.h>
30# include <p8est_bits.h>
31# include <p8est_communication.h>
32# include <p8est_extended.h>
33# include <p8est_ghost.h>
34# include <p8est_iterate.h>
35# include <p8est_search.h>
36# include <p8est_vtk.h>
48 template <
int dim,
int spacedim>
77 static const int max_n_child_indices_bits = 27;
80 static const int n_bits = std::numeric_limits<quadrant>::digits;
97# ifdef P4EST_SEARCH_LOCAL
98 using search_partition_callback = p4est_search_partition_t;
116# ifdef P4EST_SEARCH_LOCAL
117 using search_partition_callback = p8est_search_partition_t;
136 static int (&quadrant_compare)(
const void *
v1,
const void *v2);
193 static void (&connectivity_destroy)(p4est_connectivity_t *connectivity);
201 std::size_t data_size,
202 p4est_init_t init_fn,
211 int refine_recursive,
212 p4est_refine_t refine_fn,
213 p4est_init_t init_fn);
216 int coarsen_recursive,
217 p4est_coarsen_t coarsen_fn,
218 p4est_init_t init_fn);
222 p4est_init_t init_fn);
225 int partition_for_coarsening,
226 p4est_weight_t weight_fn);
228 static void (&save)(
const char *filename,
234 std::size_t data_size,
241 static int (&connectivity_save)(
const char *filename,
247 std::size_t *length);
253 const char *baseName);
261 std::size_t data_size,
262 p4est_init_t init_fn,
267 static std::size_t (&connectivity_memory_used)(
270 template <
int spacedim>
276 static constexpr unsigned int max_level = P4EST_MAXLEVEL;
283 const void *src_data,
284 std::size_t data_size);
292 const void *src_data,
293 std::size_t data_size);
302 const int *dest_sizes,
303 const void *src_data,
304 const int *src_sizes);
312 const int *dest_sizes,
313 const void *src_data,
314 const int *src_sizes);
318# ifdef P4EST_SEARCH_LOCAL
319 static void (&search_partition)(
327 static void (&quadrant_coord_to_vertex)(
339 static int (&quadrant_compare)(
const void *
v1,
const void *v2);
400 static void (&connectivity_destroy)(p8est_connectivity_t *connectivity);
408 std::size_t data_size,
409 p8est_init_t init_fn,
418 int refine_recursive,
419 p8est_refine_t refine_fn,
420 p8est_init_t init_fn);
423 int coarsen_recursive,
424 p8est_coarsen_t coarsen_fn,
425 p8est_init_t init_fn);
429 p8est_init_t init_fn);
432 int partition_for_coarsening,
433 p8est_weight_t weight_fn);
435 static void (&save)(
const char *filename,
441 std::size_t data_size,
448 static int (&connectivity_save)(
const char *filename,
454 std::size_t *length);
460 const char *baseName);
467 std::size_t data_size,
468 p8est_init_t init_fn,
473 static std::size_t (&connectivity_memory_used)(
476 static constexpr unsigned int max_level = P8EST_MAXLEVEL;
483 const void *src_data,
484 std::size_t data_size);
492 const void *src_data,
493 std::size_t data_size);
502 const int *dest_sizes,
503 const void *src_data,
504 const int *src_sizes);
512 const int *dest_sizes,
513 const void *src_data,
514 const int *src_sizes);
518# ifdef P4EST_SEARCH_LOCAL
519 static void (&search_partition)(
527 static void (&quadrant_coord_to_vertex)(
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
void init_coarse_quadrant(typename types< dim >::quadrant &quad)
types< 2 >::connectivity * copy_connectivity< 2 >(const typename types< 2 >::connectivity *connectivity)
types< 3 >::connectivity * copy_connectivity< 3 >(const typename types< 3 >::connectivity *connectivity)
bool quadrant_is_equal(const typename types< dim >::quadrant &q1, const typename types< dim >::quadrant &q2)
void init_quadrant_children(const typename types< dim >::quadrant &p4est_cell, typename types< dim >::quadrant(&p4est_children)[::GeometryInfo< dim >::max_children_per_cell])
bool quadrant_is_ancestor(const typename types< dim >::quadrant &q1, const typename types< dim >::quadrant &q2)
bool tree_exists_locally(const typename types< dim >::forest *parallel_forest, const typename types< dim >::topidx coarse_grid_cell)
types< dim >::connectivity * copy_connectivity(const typename types< dim >::connectivity *connectivity)
static types< 2 >::forest *(&) new_forest(MPI_Comm mpicomm, types< 2 >::connectivity *connectivity, types< 2 >::locidx min_quadrants, int min_level, int fill_uniform, std::size_t data_size, p4est_init_t init_fn, void *user_pointer)
static types< 2 >::forest *(&) copy_forest(types< 2 >::forest *input, int copy_data)
static types< 2 >::connectivity *(&) connectivity_new(types< 2 >::topidx num_vertices, types< 2 >::topidx num_trees, types< 2 >::topidx num_corners, types< 2 >::topidx num_vtt)
static types< 2 >::forest *(&) load_ext(const char *filename, MPI_Comm mpicomm, std::size_t data_size, int load_data, int autopartition, int broadcasthead, void *user_pointer, types< 2 >::connectivity **p4est)
static types< 2 >::connectivity *(&) connectivity_load(const char *filename, std::size_t *length)
static types< 2 >::connectivity *(&) connectivity_new_copy(types< 2 >::topidx num_vertices, types< 2 >::topidx num_trees, types< 2 >::topidx num_corners, const double *vertices, const types< 2 >::topidx *ttv, const types< 2 >::topidx *ttt, const int8_t *ttf, const types< 2 >::topidx *ttc, const types< 2 >::topidx *coff, const types< 2 >::topidx *ctt, const int8_t *ctc)
static void iterate(::internal::p4est::types< 2 >::forest *parallel_forest, ::internal::p4est::types< 2 >::ghost *parallel_ghost, void *user_data)
static types< 2 >::transfer_context *(&) transfer_fixed_begin(const types< 2 >::gloidx *dest_gfq, const types< 2 >::gloidx *src_gfq, MPI_Comm mpicomm, int tag, void *dest_data, const void *src_data, std::size_t data_size)
static types< 2 >::ghost *(&) ghost_new(types< 2 >::forest *p4est, types< 2 >::balance_type btype)
static types< 2 >::transfer_context *(&) transfer_custom_begin(const types< 2 >::gloidx *dest_gfq, const types< 2 >::gloidx *src_gfq, MPI_Comm mpicomm, int tag, void *dest_data, const int *dest_sizes, const void *src_data, const int *src_sizes)
static types< 3 >::connectivity *(&) connectivity_new_copy(types< 3 >::topidx num_vertices, types< 3 >::topidx num_trees, types< 3 >::topidx num_edges, types< 3 >::topidx num_corners, const double *vertices, const types< 3 >::topidx *ttv, const types< 3 >::topidx *ttt, const int8_t *ttf, const types< 3 >::topidx *tte, const types< 3 >::topidx *eoff, const types< 3 >::topidx *ett, const int8_t *ete, const types< 3 >::topidx *ttc, const types< 3 >::topidx *coff, const types< 3 >::topidx *ctt, const int8_t *ctc)
static types< 3 >::forest *(&) load_ext(const char *filename, MPI_Comm mpicomm, std::size_t data_size, int load_data, int autopartition, int broadcasthead, void *user_pointer, types< 3 >::connectivity **p4est)
static types< 3 >::transfer_context *(&) transfer_custom_begin(const types< 3 >::gloidx *dest_gfq, const types< 3 >::gloidx *src_gfq, MPI_Comm mpicomm, int tag, void *dest_data, const int *dest_sizes, const void *src_data, const int *src_sizes)
static types< 3 >::ghost *(&) ghost_new(types< 3 >::forest *p4est, types< 3 >::balance_type btype)
static types< 3 >::connectivity *(&) connectivity_new(types< 3 >::topidx num_vertices, types< 3 >::topidx num_trees, types< 3 >::topidx num_edges, types< 3 >::topidx num_ett, types< 3 >::topidx num_corners, types< 3 >::topidx num_ctt)
static types< 3 >::connectivity *(&) connectivity_load(const char *filename, std::size_t *length)
static types< 3 >::forest *(&) copy_forest(types< 3 >::forest *input, int copy_data)
static types< 3 >::transfer_context *(&) transfer_fixed_begin(const types< 3 >::gloidx *dest_gfq, const types< 3 >::gloidx *src_gfq, MPI_Comm mpicomm, int tag, void *dest_data, const void *src_data, std::size_t data_size)
static types< 3 >::forest *(&) new_forest(MPI_Comm mpicomm, types< 3 >::connectivity *connectivity, types< 3 >::locidx min_quadrants, int min_level, int fill_uniform, std::size_t data_size, p8est_init_t init_fn, void *user_pointer)
p4est_iter_corner_t corner_iter
p4est_iter_corner_info_t corner_info
p4est_iter_face_info_t face_info
p4est_iter_face_side_t face_side
p4est_iter_corner_side_t corner_side
p4est_iter_face_t face_iter
p8est_iter_corner_t corner_iter
p8est_iter_corner_info_t corner_info
p8est_iter_face_info_t face_info
p8est_iter_edge_side_t edge_side
p8est_iter_edge_t edge_iter
p8est_iter_edge_info_t edge_info
p8est_iter_face_side_t face_side
p8est_iter_face_t face_iter
p8est_iter_corner_side_t corner_side
p4est_connectivity_t connectivity
p4est_connect_type_t balance_type
p4est_quadrant_t quadrant
p4est_qcoord_t quadrant_coord
p4est_transfer_context_t transfer_context
p8est_quadrant_t quadrant
p8est_connectivity_t connectivity
p4est_qcoord_t quadrant_coord
p8est_transfer_context_t transfer_context
p8est_connect_type_t balance_type