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_extended.h> 24 # include <p4est_vtk.h> 25 # include <p4est_ghost.h> 26 # include <p4est_communication.h> 27 # include <p4est_iterate.h> 29 # include <p8est_bits.h> 30 # include <p8est_extended.h> 31 # include <p8est_vtk.h> 32 # include <p8est_ghost.h> 33 # include <p8est_communication.h> 34 # include <p8est_iterate.h> 40 DEAL_II_NAMESPACE_OPEN
67 typedef p4est_connectivity_t connectivity;
68 typedef p4est_t forest;
69 typedef p4est_tree_t tree;
70 typedef p4est_quadrant_t quadrant;
71 typedef p4est_topidx_t topidx;
72 typedef p4est_locidx_t locidx;
73 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 74 typedef p4est_connect_type_t balance_type;
76 typedef p4est_balance_type_t balance_type;
78 typedef p4est_ghost_t ghost;
84 typedef p8est_connectivity_t connectivity;
85 typedef p8est_t forest;
86 typedef p8est_tree_t tree;
87 typedef p8est_quadrant_t quadrant;
88 typedef p4est_topidx_t topidx;
89 typedef p4est_locidx_t locidx;
90 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 91 typedef p8est_connect_type_t balance_type;
93 typedef p8est_balance_type_t balance_type;
95 typedef p8est_ghost_t ghost;
112 int (&quadrant_compare) (
const void *v1,
const void *v2);
165 void (&connectivity_destroy) (p4est_connectivity_t *connectivity);
174 p4est_init_t init_fn,
182 int refine_recursive,
183 p4est_refine_t refine_fn,
184 p4est_init_t init_fn);
188 int coarsen_recursive,
189 p4est_coarsen_t coarsen_fn,
190 p4est_init_t init_fn);
195 p4est_init_t init_fn);
197 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 200 int partition_for_coarsening,
201 p4est_weight_t weight_fn);
205 int partition_for_coarsening,
206 p4est_weight_t weight_fn);
210 void (&save) (
const char *filename,
214 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 234 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 236 int (&connectivity_save) (
const char *filename,
240 void (&connectivity_save) (
const char *filename,
247 #if DEAL_II_P4EST_VERSION_GTE(1,0,0,0) 251 #elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 254 long unsigned *length);
267 const char *baseName);
279 p4est_init_t init_fn,
288 template <
int spacedim>
293 static const unsigned int max_level = P4EST_MAXLEVEL;
300 int (&quadrant_compare) (
const void *v1,
const void *v2);
353 void (&connectivity_destroy) (p8est_connectivity_t *connectivity);
362 p8est_init_t init_fn,
370 int refine_recursive,
371 p8est_refine_t refine_fn,
372 p8est_init_t init_fn);
376 int coarsen_recursive,
377 p8est_coarsen_t coarsen_fn,
378 p8est_init_t init_fn);
383 p8est_init_t init_fn);
385 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 388 int partition_for_coarsening,
389 p8est_weight_t weight_fn);
393 int partition_for_coarsening,
394 p8est_weight_t weight_fn);
398 void (&save) (
const char *filename,
402 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 406 std::size_t data_size,
416 std::size_t data_size,
422 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 424 int (&connectivity_save) (
const char *filename,
428 void (&connectivity_save) (
const char *filename,
435 #if DEAL_II_P4EST_VERSION_GTE(1,0,0,0) 439 #elif DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 442 long unsigned *length);
455 const char *baseName);
466 p8est_init_t init_fn,
475 template <
int spacedim>
480 static const unsigned int max_level = P8EST_MAXLEVEL;
491 template <
int dim>
struct iter;
493 template <>
struct iter<2>
495 typedef p4est_iter_corner_info_t corner_info;
496 typedef p4est_iter_corner_side_t corner_side;
497 typedef p4est_iter_corner_t corner_iter;
498 typedef p4est_iter_face_info_t face_info;
499 typedef p4est_iter_face_side_t face_side;
500 typedef p4est_iter_face_t face_iter;
503 template <>
struct iter<3>
505 typedef p8est_iter_corner_info_t corner_info;
506 typedef p8est_iter_corner_side_t corner_side;
507 typedef p8est_iter_corner_t corner_iter;
508 typedef p8est_iter_edge_info_t edge_info;
509 typedef p8est_iter_edge_side_t edge_side;
510 typedef p8est_iter_edge_t edge_iter;
511 typedef p8est_iter_face_info_t face_info;
512 typedef p8est_iter_face_side_t face_side;
513 typedef p8est_iter_face_t face_iter;
524 init_quadrant_children
525 (
const typename types<dim>::quadrant &p4est_cell,
535 init_coarse_quadrant(
typename types<dim>::quadrant &quad);
544 quadrant_is_equal (
const typename types<dim>::quadrant &q1,
545 const typename types<dim>::quadrant &q2);
554 quadrant_is_ancestor (
const typename types<dim>::quadrant &q1,
555 const typename types<dim>::quadrant &q2);
564 tree_exists_locally (
const typename types<dim>::forest *parallel_forest,
565 const typename types<dim>::topidx coarse_grid_cell);
572 template <
int dim,
int spacedim>
575 typename ::parallel::distributed::Triangulation<dim,spacedim> *triangulation;
577 std::map<unsigned int, std::set<::types::subdomain_id> > *vertices_with_ghost_neighbors;
584 DEAL_II_NAMESPACE_CLOSE
586 #endif //DEAL_II_WITH_P4EST 588 #endif //dealii__p4est_wrappers_h