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>
50 DEAL_II_NAMESPACE_OPEN
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
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
431 virtual void clear ();
570 const std::vector<unsigned int> &
624 void save(
const char *filename)
const;
634 void load(
const char *filename);
650 CELL_PERSIST, CELL_REFINE, CELL_COARSEN, CELL_INVALID
683 const std_cxx1x::function<
void (
const cell_iterator &,
685 void *)> &pack_callback);
695 const std_cxx1x::function<
void (
const cell_iterator &,
697 const void *)> &unpack_callback);
706 const std::vector<types::global_dof_index> &
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;
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>
996 const std::vector<types::global_dof_index> &
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
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
1121 DEAL_II_NAMESPACE_CLOSE
const std::vector< types::global_dof_index > & get_p4est_tree_to_coarse_cell_permutation() const
MPI_Comm get_communicator() const
const std::vector< unsigned int > & n_locally_owned_active_cells_per_processor() const
typename::internal::p4est::types< dim >::connectivity * connectivity
virtual std::size_t memory_consumption() const
void fill_vertices_with_ghost_neighbors(std::map< unsigned int, std::set<::types::subdomain_id > > &vertices_with_ghost_neighbors)
virtual void create_triangulation(const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata)
virtual std::size_t memory_consumption_p4est() const
void copy_local_forest_to_triangulation()
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation
void setup_coarse_cell_to_p4est_tree_permutation()
void save(const char *filename) const
std::vector< Point< spacedim > > vertices
bool triangulation_has_content
void notify_ready_to_unpack(const unsigned int offset, const std_cxx1x::function< void(const cell_iterator &, const CellStatus, const void *)> &unpack_callback)
unsigned int attached_data_size
void load(const char *filename)
types::subdomain_id my_subdomain
void copy_new_triangulation_to_p4est(::internal::int2type< 2 >)
MPI_Comm mpi_communicator
unsigned int get_checksum() const
callback_list_t attached_data_pack_callbacks
typename::internal::p4est::types< dim >::ghost * parallel_ghost
typename::internal::p4est::types< dim >::forest * parallel_forest
types::subdomain_id locally_owned_subdomain() const
typename::internal::p4est::types< dim >::tree * init_tree(const int dealii_coarse_cell_index) const
Triangulation(MPI_Comm mpi_communicator, const typename::Triangulation< dim, spacedim >::MeshSmoothing smooth_grid=(::Triangulation< dim, spacedim >::none), const Settings settings=default_setting)
void update_number_cache()
unsigned int global_dof_index
unsigned int register_data_attach(const std::size_t size, const std_cxx1x::function< void(const cell_iterator &, const CellStatus, void *)> &pack_callback)
unsigned int n_locally_owned_active_cells() const
void add_periodicity(const std::vector< GridTools::PeriodicFacePair< cell_iterator > > &)
virtual unsigned int n_global_levels() const
unsigned int subdomain_id
bool refinement_in_progress
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria)
types::global_dof_index n_global_active_cells() const
void write_mesh_vtk(const char *file_basename) const
MeshSmoothing smooth_grid
unsigned int n_attached_datas
unsigned int n_attached_deserialize
virtual void execute_coarsening_and_refinement()
::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation