16#ifndef dealii_p4est_wrappers_h
17#define dealii_p4est_wrappers_h
23#ifdef DEAL_II_WITH_P4EST
24# include <p4est_bits.h>
25# include <p4est_communication.h>
26# include <p4est_extended.h>
27# include <p4est_ghost.h>
28# include <p4est_iterate.h>
29# include <p4est_search.h>
30# include <p4est_vtk.h>
31# include <p8est_bits.h>
32# include <p8est_communication.h>
33# include <p8est_extended.h>
34# include <p8est_ghost.h>
35# include <p8est_iterate.h>
36# include <p8est_search.h>
37# include <p8est_vtk.h>
49 template <
int dim,
int spacedim>
78 static const int max_n_child_indices_bits = 27;
81 static const int n_bits = std::numeric_limits<quadrant>::digits;
98# ifdef P4EST_SEARCH_LOCAL
99 using search_partition_callback = p4est_search_partition_t;
117# ifdef P4EST_SEARCH_LOCAL
118 using search_partition_callback = p8est_search_partition_t;
137 static int (&quadrant_compare)(
const void *
v1,
const void *v2);
194 static void (&connectivity_destroy)(p4est_connectivity_t *connectivity);
202 std::size_t data_size,
203 p4est_init_t init_fn,
204 void * user_pointer);
212 int refine_recursive,
213 p4est_refine_t refine_fn,
214 p4est_init_t init_fn);
217 int coarsen_recursive,
218 p4est_coarsen_t coarsen_fn,
219 p4est_init_t init_fn);
223 p4est_init_t init_fn);
226 int partition_for_coarsening,
227 p4est_weight_t weight_fn);
229 static void (&save)(
const char * filename,
235 std::size_t data_size,
242 static int (&connectivity_save)(
const char * filename,
248 std::size_t *length);
254 const char *baseName);
262 std::size_t data_size,
263 p4est_init_t init_fn,
264 void * user_pointer);
268 static std::size_t (&connectivity_memory_used)(
271 template <
int spacedim>
277 static constexpr unsigned int max_level = P4EST_MAXLEVEL;
284 const void * src_data,
285 std::size_t data_size);
293 const void * src_data,
294 std::size_t data_size);
303 const int * dest_sizes,
304 const void * src_data,
305 const int * src_sizes);
313 const int * dest_sizes,
314 const void * src_data,
315 const int * src_sizes);
319# ifdef P4EST_SEARCH_LOCAL
320 static void (&search_partition)(
325 sc_array_t * points);
328 static void (&quadrant_coord_to_vertex)(
340 static int (&quadrant_compare)(
const void *
v1,
const void *v2);
401 static void (&connectivity_destroy)(p8est_connectivity_t *connectivity);
409 std::size_t data_size,
410 p8est_init_t init_fn,
411 void * user_pointer);
419 int refine_recursive,
420 p8est_refine_t refine_fn,
421 p8est_init_t init_fn);
424 int coarsen_recursive,
425 p8est_coarsen_t coarsen_fn,
426 p8est_init_t init_fn);
430 p8est_init_t init_fn);
433 int partition_for_coarsening,
434 p8est_weight_t weight_fn);
436 static void (&save)(
const char * filename,
442 std::size_t data_size,
449 static int (&connectivity_save)(
const char * filename,
455 std::size_t *length);
461 const char *baseName);
468 std::size_t data_size,
469 p8est_init_t init_fn,
470 void * user_pointer);
474 static std::size_t (&connectivity_memory_used)(
477 static constexpr unsigned int max_level = P8EST_MAXLEVEL;
484 const void * src_data,
485 std::size_t data_size);
493 const void * src_data,
494 std::size_t data_size);
503 const int * dest_sizes,
504 const void * src_data,
505 const int * src_sizes);
513 const int * dest_sizes,
514 const void * src_data,
515 const int * src_sizes);
519# ifdef P4EST_SEARCH_LOCAL
520 static void (&search_partition)(
525 sc_array_t * points);
528 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