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/distributed/tria_base.h> 27 #include <deal.II/distributed/p4est_wrappers.h> 35 #include <type_traits> 37 #ifdef DEAL_II_WITH_MPI 41 #ifdef DEAL_II_WITH_P4EST 42 #include <p4est_connectivity.h> 44 #include <p4est_ghost.h> 46 #include <p8est_connectivity.h> 48 #include <p8est_ghost.h> 52 DEAL_II_NAMESPACE_OPEN
54 #ifdef DEAL_II_WITH_P4EST 58 namespace DoFHandlerImplementation
71 template <
int,
int,
class>
class ExtrapolateImplementation;
244 template <
int dim,
int spacedim = dim>
265 typedef typename ::Triangulation<dim,spacedim>::cell_iterator
cell_iterator;
287 typedef typename ::Triangulation<dim,spacedim>::CellStatus
CellStatus;
357 const typename ::Triangulation<dim,spacedim>::MeshSmoothing
372 virtual void clear ();
587 void save(
const char *filename)
const;
607 void load(
const char *filename,
608 const bool autopartition =
true);
709 void *)> &pack_callback);
763 const void *)> &unpack_callback);
771 const std::vector<types::global_dof_index> &
779 const std::vector<types::global_dof_index> &
869 using pack_callback_t = std::function<void (typename Triangulation<dim,spacedim>::cell_iterator,
899 std::vector<types::global_dof_index> p4est_tree_to_coarse_cell_permutation;
905 typename ::internal::p4est::types<dim>::tree *
906 init_tree(
const int dealii_coarse_cell_index)
const;
962 std::vector<unsigned int>
972 virtual std::map<unsigned int, std::set<::types::subdomain_id> >
987 template <
typename>
friend class ::internal::DoFHandlerImplementation::Policy::ParallelDistributed;
989 template <
int,
int,
class>
friend class ::FETools::internal::ExtrapolateImplementation;
998 template <
int spacedim>
1018 const typename ::Triangulation<1,spacedim>::MeshSmoothing
1033 const std::vector<types::global_dof_index> &
1075 void load(
const char *filename,
1076 const bool autopartition =
true);
1081 void save(
const char *filename)
const;
1088 const std::function<
void (
const typename ::Triangulation<1,spacedim>::cell_iterator &,
1089 const typename ::Triangulation<1,spacedim>::CellStatus,
1090 void *)> &pack_callback);
1097 const std::function<
void (
const typename ::Triangulation<1,spacedim>::cell_iterator &,
1098 const typename ::Triangulation<1,spacedim>::CellStatus,
1099 const void *)> &unpack_callback);
1106 std::vector<types::global_dof_index> p4est_tree_to_coarse_cell_permutation;
1119 std::map<unsigned int, std::set<::types::subdomain_id> >
1126 std::map<unsigned int, std::set<::types::subdomain_id> >
1127 compute_level_vertices_with_ghost_neighbors (
const unsigned int level)
const;
1141 #else // DEAL_II_WITH_P4EST 1145 namespace distributed
1158 template <
int dim,
int spacedim = dim>
1175 DEAL_II_NAMESPACE_CLOSE
std::vector< unsigned int > get_cell_weights()
typename ::internal::p4est::types< dim >::connectivity * connectivity
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation
std::vector< Point< spacedim > > vertices
virtual std::size_t memory_consumption() const
bool triangulation_has_content
virtual std::map< unsigned int, std::set<::types::subdomain_id > > compute_vertices_with_ghost_neighbors() const
MPI_Comm mpi_communicator
virtual std::size_t memory_consumption_p4est() const
void load(const char *filename, const bool autopartition=true)
const std::vector< types::global_dof_index > & get_p4est_tree_to_coarse_cell_permutation() const
typename ::internal::p4est::types< dim >::ghost * parallel_ghost
typename ::internal::p4est::types< dim >::forest * parallel_forest
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &other_tria)
virtual void create_triangulation(const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata)
virtual bool prepare_coarsening_and_refinement()
virtual void add_periodicity(const std::vector<::GridTools::PeriodicFacePair< cell_iterator > > &)
unsigned int register_data_attach(const std::size_t size, const std::function< void(const cell_iterator &, const CellStatus, void *)> &pack_callback)
const std::vector< types::global_dof_index > & get_coarse_cell_to_p4est_tree_permutation() const
virtual bool has_hanging_nodes() const
void copy_new_triangulation_to_p4est(std::integral_constant< int, 2 >)
void notify_ready_to_unpack(const unsigned int handle, const std::function< void(const cell_iterator &, const CellStatus, const void *)> &unpack_callback)
void save(const char *filename) const
typename ::internal::p4est::types< dim >::tree * init_tree(const int dealii_coarse_cell_index) const
virtual void execute_coarsening_and_refinement()
unsigned int n_attached_datas
::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
unsigned int n_attached_deserialize
unsigned int cumulative_fixed_data_size
std::map< unsigned int, pack_callback_t > pack_callbacks
void communicate_locally_moved_vertices(const std::vector< bool > &vertex_locally_moved)
unsigned int get_checksum() const
MeshSmoothing smooth_grid
void setup_coarse_cell_to_p4est_tree_permutation()
::Triangulation< dim, spacedim >::cell_iterator cell_iterator
Triangulation(MPI_Comm mpi_communicator, const typename ::Triangulation< dim, spacedim >::MeshSmoothing smooth_grid=(::Triangulation< dim, spacedim >::none), const Settings settings=default_setting)
virtual void update_number_cache()
void copy_local_forest_to_triangulation()
std::vector< bool > mark_locally_active_vertices_on_level(const int level) const
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation
void write_mesh_vtk(const char *file_basename) const