16 #ifndef dealii__distributed_tria_h 17 #define dealii__distributed_tria_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/subscriptor.h> 22 #include <deal.II/base/smartpointer.h> 23 #include <deal.II/base/template_constraints.h> 24 #include <deal.II/grid/tria.h> 26 #include <deal.II/base/std_cxx11/function.h> 27 #include <deal.II/base/std_cxx11/tuple.h> 29 #include <deal.II/distributed/tria_base.h> 36 #ifdef DEAL_II_WITH_MPI 40 #ifdef DEAL_II_WITH_P4EST 41 #include <p4est_connectivity.h> 43 #include <p4est_ghost.h> 45 #include <p8est_connectivity.h> 47 #include <p8est_ghost.h> 51 DEAL_II_NAMESPACE_OPEN
55 #ifdef DEAL_II_WITH_P4EST 85 typedef p4est_connectivity_t connectivity;
86 typedef p4est_t forest;
87 typedef p4est_tree_t tree;
88 typedef p4est_quadrant_t quadrant;
89 typedef p4est_topidx_t topidx;
90 typedef p4est_locidx_t locidx;
91 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 92 typedef p4est_connect_type_t balance_type;
94 typedef p4est_balance_type_t balance_type;
96 typedef p4est_ghost_t ghost;
102 typedef p8est_connectivity_t connectivity;
103 typedef p8est_t forest;
104 typedef p8est_tree_t tree;
105 typedef p8est_quadrant_t quadrant;
106 typedef p4est_topidx_t topidx;
107 typedef p4est_locidx_t locidx;
108 #if DEAL_II_P4EST_VERSION_GTE(0,3,4,3) 109 typedef p8est_connect_type_t balance_type;
111 typedef p8est_balance_type_t balance_type;
113 typedef p8est_ghost_t ghost;
123 init_quadrant_children
166 namespace distributed
327 template <
int dim,
int spacedim = dim>
348 typedef typename ::Triangulation<dim,spacedim>::cell_iterator
cell_iterator;
370 typedef typename ::Triangulation<dim,spacedim>::CellStatus
CellStatus;
381 default_setting = 0x0,
390 mesh_reconstruction_after_repartitioning = 0x1,
397 construct_multigrid_hierarchy = 0x2,
403 no_automatic_repartitioning = 0x4
437 const typename ::Triangulation<dim,spacedim>::MeshSmoothing
439 const Settings settings = default_setting);
452 virtual void clear ();
457 virtual void copy_triangulation (const ::Triangulation<dim, spacedim> &old_tria);
468 virtual void create_triangulation (
const std::vector<
Point<spacedim> > &vertices,
501 virtual void execute_coarsening_and_refinement ();
509 virtual bool prepare_coarsening_and_refinement ();
606 communicate_locally_moved_vertices (
const std::vector<bool> &vertex_locally_moved);
625 bool has_hanging_nodes()
const;
630 virtual std::size_t memory_consumption ()
const;
637 virtual std::size_t memory_consumption_p4est ()
const;
646 void write_mesh_vtk (
const char *file_basename)
const;
652 unsigned int get_checksum ()
const;
661 void save(
const char *filename)
const;
681 void load(
const char *filename,
682 const bool autopartition =
true);
719 register_data_attach (
const std::size_t size,
720 const std_cxx11::function<
void (
const cell_iterator &,
722 void *)> &pack_callback);
739 notify_ready_to_unpack (
const unsigned int offset,
740 const std_cxx11::function<
void (
const cell_iterator &,
742 const void *)> &unpack_callback);
750 const std::vector<types::global_dof_index> &
751 get_p4est_tree_to_coarse_cell_permutation()
const;
758 const std::vector<types::global_dof_index> &
759 get_coarse_cell_to_p4est_tree_permutation()
const;
790 virtual void update_number_cache ();
851 typedef std_cxx11::function<
855 typedef std::pair<unsigned int, pack_callback_t> callback_pair_t;
857 typedef std::list<callback_pair_t> callback_list_t;
880 std::vector<types::global_dof_index> p4est_tree_to_coarse_cell_permutation;
893 typename ::internal::p4est::types<dim>::tree *
894 init_tree(
const int dealii_coarse_cell_index)
const;
900 void setup_coarse_cell_to_p4est_tree_permutation ();
915 void copy_local_forest_to_triangulation ();
922 void attach_mesh_data();
937 std::vector<unsigned int>
946 fill_vertices_with_ghost_neighbors
947 (std::map<
unsigned int, std::set<::types::subdomain_id> >
948 &vertices_with_ghost_neighbors);
956 fill_level_vertices_with_ghost_neighbors
957 (
const unsigned int level,
958 std::map<
unsigned int, std::set<::types::subdomain_id> >
959 &vertices_with_ghost_neighbors);
971 mark_locally_active_vertices_on_level(
const unsigned int level)
const;
973 template <
int,
int>
friend class ::internal::DoFHandler::Policy::ParallelDistributed;
982 template <
int spacedim>
1003 const std::vector<types::global_dof_index> &
1004 get_p4est_tree_to_coarse_cell_permutation()
const;
1040 communicate_locally_moved_vertices (
const std::vector<bool> &vertex_locally_moved);
1047 std::vector<types::global_dof_index> p4est_tree_to_coarse_cell_permutation;
1054 default_setting = 0x0,
1055 mesh_reconstruction_after_repartitioning = 0x1,
1056 construct_multigrid_hierarchy = 0x2
1071 fill_vertices_with_ghost_neighbors
1072 (std::map<
unsigned int, std::set<::types::subdomain_id> >
1073 &vertices_with_ghost_neighbors);
1080 fill_level_vertices_with_ghost_neighbors
1081 (
const unsigned int level,
1082 std::map<
unsigned int, std::set<::types::subdomain_id> >
1083 &vertices_with_ghost_neighbors);
1090 mark_locally_active_vertices_on_level(
const unsigned int level)
const;
1097 #else // DEAL_II_WITH_P4EST 1101 namespace distributed
1113 template <
int dim,
int spacedim = dim>
1130 DEAL_II_NAMESPACE_CLOSE
typename ::internal::p4est::types< dim >::connectivity * connectivity
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation
bool triangulation_has_content
unsigned int attached_data_size
callback_list_t attached_data_pack_callbacks
typename ::internal::p4est::types< dim >::ghost * parallel_ghost
typename ::internal::p4est::types< dim >::forest * parallel_forest
bool refinement_in_progress
::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
unsigned int n_attached_datas
::Triangulation< dim, spacedim >::cell_iterator cell_iterator
std::vector< GridTools::PeriodicFacePair< cell_iterator > > periodic_face_pairs_level_0
unsigned int n_attached_deserialize
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation