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_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_vtk.h>
49 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;
128 static int (&quadrant_compare)(
const void *
v1,
const void *v2);
185 static void (&connectivity_destroy)(p4est_connectivity_t *connectivity);
193 std::size_t data_size,
194 p4est_init_t init_fn,
195 void * user_pointer);
203 int refine_recursive,
204 p4est_refine_t refine_fn,
205 p4est_init_t init_fn);
208 int coarsen_recursive,
209 p4est_coarsen_t coarsen_fn,
210 p4est_init_t init_fn);
214 p4est_init_t init_fn);
217 int partition_for_coarsening,
218 p4est_weight_t weight_fn);
220 static void (&save)(
const char * filename,
226 std::size_t data_size,
233 static int (&connectivity_save)(
const char * filename,
239 std::size_t *length);
245 const char *baseName);
253 std::size_t data_size,
254 p4est_init_t init_fn,
255 void * user_pointer);
259 static std::size_t (&connectivity_memory_used)(
262 template <
int spacedim>
268 static constexpr unsigned int max_level = P4EST_MAXLEVEL;
275 const void * src_data,
276 std::size_t data_size);
284 const void * src_data,
285 std::size_t data_size);
294 const int * dest_sizes,
295 const void * src_data,
296 const int * src_sizes);
304 const int * dest_sizes,
305 const void * src_data,
306 const int * src_sizes);
315 static int (&quadrant_compare)(
const void *
v1,
const void *v2);
376 static void (&connectivity_destroy)(p8est_connectivity_t *connectivity);
384 std::size_t data_size,
385 p8est_init_t init_fn,
386 void * user_pointer);
394 int refine_recursive,
395 p8est_refine_t refine_fn,
396 p8est_init_t init_fn);
399 int coarsen_recursive,
400 p8est_coarsen_t coarsen_fn,
401 p8est_init_t init_fn);
405 p8est_init_t init_fn);
408 int partition_for_coarsening,
409 p8est_weight_t weight_fn);
411 static void (&save)(
const char * filename,
417 std::size_t data_size,
424 static int (&connectivity_save)(
const char * filename,
430 std::size_t *length);
436 const char *baseName);
443 std::size_t data_size,
444 p8est_init_t init_fn,
445 void * user_pointer);
449 static std::size_t (&connectivity_memory_used)(
452 static constexpr unsigned int max_level = P8EST_MAXLEVEL;
459 const void * src_data,
460 std::size_t data_size);
468 const void * src_data,
469 std::size_t data_size);
478 const int * dest_sizes,
479 const void * src_data,
480 const int * src_sizes);
488 const int * dest_sizes,
489 const void * src_data,
490 const int * src_sizes);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
void refine(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold, const unsigned int max_to_mark=numbers::invalid_unsigned_int)
void coarsen(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold)
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_transfer_context_t transfer_context
p8est_quadrant_t quadrant
p8est_connectivity_t connectivity
p8est_transfer_context_t transfer_context
p8est_connect_type_t balance_type