17 #ifndef __deal2__distributed_tria_h 18 #define __deal2__distributed_tria_h 21 #include <deal.II/base/config.h> 22 #include <deal.II/base/subscriptor.h> 23 #include <deal.II/base/smartpointer.h> 24 #include <deal.II/base/template_constraints.h> 25 #include <deal.II/grid/tria.h> 27 #include <deal.II/base/std_cxx1x/function.h> 28 #include <deal.II/base/std_cxx1x/tuple.h> 35 #ifdef DEAL_II_WITH_MPI 39 #ifdef DEAL_II_WITH_P4EST 40 #include <p4est_connectivity.h> 42 #include <p4est_ghost.h> 44 #include <p8est_connectivity.h> 46 #include <p8est_ghost.h> 54 #ifdef DEAL_II_WITH_P4EST 94 typedef p4est_connectivity_t connectivity;
95 typedef p4est_t forest;
96 typedef p4est_tree_t tree;
97 typedef p4est_quadrant_t quadrant;
98 typedef p4est_topidx_t topidx;
99 typedef p4est_locidx_t locidx;
100 typedef p4est_balance_type_t balance_type;
101 typedef p4est_ghost_t ghost;
107 typedef p8est_connectivity_t connectivity;
108 typedef p8est_t forest;
109 typedef p8est_tree_t tree;
110 typedef p8est_quadrant_t quadrant;
111 typedef p4est_topidx_t topidx;
112 typedef p4est_locidx_t locidx;
113 typedef p8est_balance_type_t balance_type;
114 typedef p8est_ghost_t ghost;
126 init_quadrant_children
164 template <
typename CellIterator>
struct PeriodicFacePair;
169 namespace distributed
318 template <
int dim,
int spacedim = dim>
328 typedef typename ::Triangulation<dim,spacedim>::cell_iterator
cell_iterator;
355 default_setting = 0x0,
356 mesh_reconstruction_after_repartitioning = 0x1,
357 construct_multigrid_hierarchy = 0x2
413 const typename ::Triangulation<dim,spacedim>::MeshSmoothing
415 const Settings settings = default_setting);
431 virtual void clear ();
438 virtual void copy_triangulation (const ::Triangulation<dim, spacedim> &old_tria);
458 virtual void create_triangulation (
const std::vector<
Point<spacedim> > &vertices,
490 virtual void execute_coarsening_and_refinement ();
541 unsigned int n_locally_owned_active_cells ()
const;
557 virtual unsigned int n_global_levels ()
const;
570 const std::vector<unsigned int> &
571 n_locally_owned_active_cells_per_processor ()
const;
578 MPI_Comm get_communicator ()
const;
584 virtual std::size_t memory_consumption ()
const;
595 virtual std::size_t memory_consumption_p4est ()
const;
607 void write_mesh_vtk (
const char *file_basename)
const;
616 unsigned int get_checksum ()
const;
624 void save(
const char *filename)
const;
634 void load(
const char *filename);
650 CELL_PERSIST, CELL_REFINE, CELL_COARSEN, CELL_INVALID
682 register_data_attach (
const std::size_t size,
683 const std_cxx1x::function<
void (
const cell_iterator &,
685 void *)> &pack_callback);
694 notify_ready_to_unpack (
const unsigned int offset,
695 const std_cxx1x::function<
void (
const cell_iterator &,
697 const void *)> &unpack_callback);
706 const std::vector<types::global_dof_index> &
707 get_p4est_tree_to_coarse_cell_permutation()
const;
770 std::vector<unsigned int> n_locally_owned_active_cells;
772 unsigned int n_global_levels;
844 typedef std_cxx1x::function<
845 void(
typename Triangulation<dim,spacedim>::cell_iterator,
CellStatus,
void *)
848 typedef std::pair<unsigned int, pack_callback_t> callback_pair_t;
850 typedef std::list<callback_pair_t> callback_list_t;
881 std::vector<types::global_dof_index> p4est_tree_to_coarse_cell_permutation;
888 typename ::internal::p4est::types<dim>::tree *
889 init_tree(
const int dealii_coarse_cell_index)
const;
896 void setup_coarse_cell_to_p4est_tree_permutation ();
914 void copy_local_forest_to_triangulation ();
922 void update_number_cache ();
931 void attach_mesh_data();
939 fill_vertices_with_ghost_neighbors
940 (std::map<
unsigned int, std::set<::types::subdomain_id> >
941 &vertices_with_ghost_neighbors);
943 template <
int,
int>
friend class ::internal::DoFHandler::Policy::ParallelDistributed;
954 template <
int spacedim>
975 MPI_Comm get_communicator ()
const;
987 virtual unsigned int n_global_levels ()
const;
996 const std::vector<types::global_dof_index> &
997 get_p4est_tree_to_coarse_cell_permutation()
const;
1021 std::vector<types::global_dof_index> p4est_tree_to_coarse_cell_permutation;
1028 default_setting = 0x0,
1029 mesh_reconstruction_after_repartitioning = 0x1,
1030 construct_multigrid_hierarchy = 0x2
1045 fill_vertices_with_ghost_neighbors
1046 (std::map<
unsigned int, std::set<::types::subdomain_id> >
1047 &vertices_with_ghost_neighbors);
1054 #else // DEAL_II_WITH_P4EST 1058 namespace distributed
1075 template <
int dim,
int spacedim = dim>
1110 #ifdef DEAL_II_WITH_MPI 1111 MPI_Comm get_communicator ()
const;
1121 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
types::subdomain_id my_subdomain
MPI_Comm mpi_communicator
callback_list_t attached_data_pack_callbacks
typename::internal::p4est::types< dim >::ghost * parallel_ghost
typename::internal::p4est::types< dim >::forest * parallel_forest
unsigned int global_dof_index
unsigned int subdomain_id
bool refinement_in_progress
unsigned int n_attached_datas
unsigned int n_attached_deserialize
::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation