16 #ifndef dealii_p4est_wrappers_h 17 #define dealii_p4est_wrappers_h 19 #include <deal.II/base/geometry_info.h> 21 #ifdef DEAL_II_WITH_P4EST 22 # include <p4est_bits.h> 23 # include <p4est_communication.h> 24 # include <p4est_extended.h> 25 # include <p4est_ghost.h> 26 # include <p4est_iterate.h> 27 # include <p4est_vtk.h> 28 # include <p8est_bits.h> 29 # include <p8est_communication.h> 30 # include <p8est_extended.h> 31 # include <p8est_ghost.h> 32 # include <p8est_iterate.h> 33 # include <p8est_vtk.h> 39 DEAL_II_NAMESPACE_OPEN
45 template <
int dim,
int spacedim>
68 using connectivity = p4est_connectivity_t;
69 using forest = p4est_t;
70 using tree = p4est_tree_t;
71 using quadrant = p4est_quadrant_t;
72 using topidx = p4est_topidx_t;
73 using locidx = p4est_locidx_t;
74 using gloidx = p4est_gloidx_t;
75 using balance_type = p4est_connect_type_t;
76 using ghost = p4est_ghost_t;
77 using transfer_context = p4est_transfer_context_t;
83 using connectivity = p8est_connectivity_t;
84 using forest = p8est_t;
85 using tree = p8est_tree_t;
86 using quadrant = p8est_quadrant_t;
87 using topidx = p4est_topidx_t;
88 using locidx = p4est_locidx_t;
89 using gloidx = p4est_gloidx_t;
90 using balance_type = p8est_connect_type_t;
91 using ghost = p8est_ghost_t;
92 using transfer_context = p8est_transfer_context_t;
110 static int (&quadrant_compare)(
const void *v1,
const void *v2);
153 static void (&connectivity_destroy)(p4est_connectivity_t *connectivity);
161 std::size_t data_size,
162 p4est_init_t init_fn,
163 void * user_pointer);
168 int refine_recursive,
169 p4est_refine_t refine_fn,
170 p4est_init_t init_fn);
173 int coarsen_recursive,
174 p4est_coarsen_t coarsen_fn,
175 p4est_init_t init_fn);
179 p4est_init_t init_fn);
182 int partition_for_coarsening,
183 p4est_weight_t weight_fn);
185 static void (&save)(
const char * filename,
191 std::size_t data_size,
198 static int (&connectivity_save)(
const char * filename,
204 std::size_t *length);
210 const char *baseName);
218 std::size_t data_size,
219 p4est_init_t init_fn,
220 void * user_pointer);
224 static std::size_t (&connectivity_memory_used)(
227 template <
int spacedim>
233 static constexpr
unsigned int max_level = P4EST_MAXLEVEL;
240 const void * src_data,
241 std::size_t data_size);
249 const void * src_data,
250 std::size_t data_size);
259 const int * dest_sizes,
260 const void * src_data,
261 const int * src_sizes);
269 const int * dest_sizes,
270 const void * src_data,
271 const int * src_sizes);
280 static int (&quadrant_compare)(
const void *v1,
const void *v2);
323 static void (&connectivity_destroy)(p8est_connectivity_t *connectivity);
331 std::size_t data_size,
332 p8est_init_t init_fn,
333 void * user_pointer);
338 int refine_recursive,
339 p8est_refine_t refine_fn,
340 p8est_init_t init_fn);
343 int coarsen_recursive,
344 p8est_coarsen_t coarsen_fn,
345 p8est_init_t init_fn);
349 p8est_init_t init_fn);
352 int partition_for_coarsening,
353 p8est_weight_t weight_fn);
355 static void (&save)(
const char * filename,
361 std::size_t data_size,
368 static int (&connectivity_save)(
const char * filename,
374 std::size_t *length);
380 const char *baseName);
387 std::size_t data_size,
388 p8est_init_t init_fn,
389 void * user_pointer);
393 static std::size_t (&connectivity_memory_used)(
396 static constexpr
unsigned int max_level = P8EST_MAXLEVEL;
403 const void * src_data,
404 std::size_t data_size);
412 const void * src_data,
413 std::size_t data_size);
422 const int * dest_sizes,
423 const void * src_data,
424 const int * src_sizes);
432 const int * dest_sizes,
433 const void * src_data,
434 const int * src_sizes);
453 using corner_info = p4est_iter_corner_info_t;
454 using corner_side = p4est_iter_corner_side_t;
455 using corner_iter = p4est_iter_corner_t;
456 using face_info = p4est_iter_face_info_t;
457 using face_side = p4est_iter_face_side_t;
458 using face_iter = p4est_iter_face_t;
464 using corner_info = p8est_iter_corner_info_t;
465 using corner_side = p8est_iter_corner_side_t;
466 using corner_iter = p8est_iter_corner_t;
467 using edge_info = p8est_iter_edge_info_t;
468 using edge_side = p8est_iter_edge_side_t;
469 using edge_iter = p8est_iter_edge_t;
470 using face_info = p8est_iter_face_info_t;
471 using face_side = p8est_iter_face_side_t;
472 using face_iter = p8est_iter_face_t;
483 init_quadrant_children(
484 const typename types<dim>::quadrant &p4est_cell,
485 typename types<dim>::quadrant (
495 init_coarse_quadrant(
typename types<dim>::quadrant &quad);
504 quadrant_is_equal(
const typename types<dim>::quadrant &q1,
505 const typename types<dim>::quadrant &q2);
514 quadrant_is_ancestor(
const typename types<dim>::quadrant &q1,
515 const typename types<dim>::quadrant &q2);
524 tree_exists_locally(
const typename types<dim>::forest *parallel_forest,
525 const typename types<dim>::topidx coarse_grid_cell);
532 template <
int dim,
int spacedim>
533 std::map<unsigned int, std::set<::types::subdomain_id>>
534 compute_vertices_with_ghost_neighbors(
535 const ::parallel::distributed::Triangulation<dim, spacedim> &tria,
536 typename ::internal::p4est::types<dim>::forest *parallel_forest,
537 typename ::internal::p4est::types<dim>::ghost * parallel_ghost);
542 DEAL_II_NAMESPACE_CLOSE
544 #endif // DEAL_II_WITH_P4EST 546 #endif // dealii_p4est_wrappers_h