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>
51 template <
int dim,
int spacedim>
79 static const int max_n_child_indices_bits = 27;
82 static const int n_bits = std::numeric_limits<quadrant>::digits;
99# ifdef P4EST_SEARCH_LOCAL
100 using search_partition_callback = p4est_search_partition_t;
118# ifdef P4EST_SEARCH_LOCAL
119 using search_partition_callback = p8est_search_partition_t;
138 static int (&quadrant_compare)(
const void *
v1,
const void *v2);
195 static void (&connectivity_destroy)(p4est_connectivity_t *connectivity);
203 std::size_t data_size,
204 p4est_init_t init_fn,
205 void * user_pointer);
213 int refine_recursive,
214 p4est_refine_t refine_fn,
215 p4est_init_t init_fn);
218 int coarsen_recursive,
219 p4est_coarsen_t coarsen_fn,
220 p4est_init_t init_fn);
224 p4est_init_t init_fn);
227 int partition_for_coarsening,
228 p4est_weight_t weight_fn);
230 static void (&save)(
const char * filename,
236 std::size_t data_size,
243 static int (&connectivity_save)(
const char * filename,
249 std::size_t *length);
255 const char *baseName);
263 std::size_t data_size,
264 p4est_init_t init_fn,
265 void * user_pointer);
269 static std::size_t (&connectivity_memory_used)(
272 template <
int spacedim>
278 static constexpr unsigned int max_level = P4EST_MAXLEVEL;
285 const void * src_data,
286 std::size_t data_size);
294 const void * src_data,
295 std::size_t data_size);
304 const int * dest_sizes,
305 const void * src_data,
306 const int * src_sizes);
314 const int * dest_sizes,
315 const void * src_data,
316 const int * src_sizes);
320# ifdef P4EST_SEARCH_LOCAL
321 static void (&search_partition)(
326 sc_array_t * points);
329 static void (&quadrant_coord_to_vertex)(
341 static int (&quadrant_compare)(
const void *
v1,
const void *v2);
402 static void (&connectivity_destroy)(p8est_connectivity_t *connectivity);
410 std::size_t data_size,
411 p8est_init_t init_fn,
412 void * user_pointer);
420 int refine_recursive,
421 p8est_refine_t refine_fn,
422 p8est_init_t init_fn);
425 int coarsen_recursive,
426 p8est_coarsen_t coarsen_fn,
427 p8est_init_t init_fn);
431 p8est_init_t init_fn);
434 int partition_for_coarsening,
435 p8est_weight_t weight_fn);
437 static void (&save)(
const char * filename,
443 std::size_t data_size,
450 static int (&connectivity_save)(
const char * filename,
456 std::size_t *length);
462 const char *baseName);
469 std::size_t data_size,
470 p8est_init_t init_fn,
471 void * user_pointer);
475 static std::size_t (&connectivity_memory_used)(
478 static constexpr unsigned int max_level = P8EST_MAXLEVEL;
485 const void * src_data,
486 std::size_t data_size);
494 const void * src_data,
495 std::size_t data_size);
504 const int * dest_sizes,
505 const void * src_data,
506 const int * src_sizes);
514 const int * dest_sizes,
515 const void * src_data,
516 const int * src_sizes);
520# ifdef P4EST_SEARCH_LOCAL
521 static void (&search_partition)(
526 sc_array_t * points);
529 static void (&quadrant_coord_to_vertex)(
#define DEAL_II_NAMESPACE_OPEN
#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