16#ifndef dealii_distributed_tria_h
17#define dealii_distributed_tria_h
32#include <boost/range/iterator_range.hpp>
41#ifdef DEAL_II_WITH_P4EST
43# include <p4est_connectivity.h>
44# include <p4est_ghost.h>
46# include <p8est_connectivity.h>
47# include <p8est_ghost.h>
52#ifdef DEAL_II_WITH_P4EST
61 template <
int,
int,
class>
62 class ExtrapolateImplementation;
69 template <
typename CellIterator>
70 struct PeriodicFacePair;
78 class TemporarilyMatchRefineFlags;
246 template <
int dim,
int spacedim = dim>
270 typename ::Triangulation<dim, spacedim>::cell_iterator;
291 typename ::Triangulation<dim, spacedim>::active_cell_iterator;
294 typename ::Triangulation<dim, spacedim>::CellStatus;
305 default_setting = 0x0,
314 mesh_reconstruction_after_repartitioning = 0x1,
320 construct_multigrid_hierarchy = 0x2,
326 no_automatic_repartitioning = 0x4,
333 communicate_vertices_to_p4est = 0x8
371 const typename ::Triangulation<dim, spacedim>::MeshSmoothing
373 const Settings
settings = default_setting);
393 is_multilevel_hierarchy_constructed()
const override;
399 are_vertices_communicated_to_p4est()
const;
416 const typename ::internal::p4est::types<dim>::forest
418 const typename ::internal::p4est::types<dim>::gloidx
419 *previous_global_first_quadrant);
430 const ::Triangulation<dim, spacedim> &other_tria)
override;
452 create_triangulation(
454 &construction_data)
override;
483 std::vector<types::subdomain_id>
484 find_point_owner_rank(
const std::vector<
Point<dim>> &points);
516 execute_coarsening_and_refinement()
override;
525 prepare_coarsening_and_refinement()
override;
574 memory_consumption()
const override;
582 memory_consumption_p4est()
const;
595 write_mesh_vtk(
const std::string &file_basename)
const;
602 get_checksum()
const;
613 save(
const std::string &filename)
const override;
635 load(
const std::string &filename)
override;
644 load(
const std::string &filename,
const bool autopartition)
override;
652 load(
const typename ::internal::p4est::types<dim>::forest *forest);
660 const std::vector<types::global_dof_index> &
661 get_p4est_tree_to_coarse_cell_permutation()
const;
668 const std::vector<types::global_dof_index> &
669 get_coarse_cell_to_p4est_tree_permutation()
const;
678 const typename ::internal::p4est::types<dim>::forest *
758 update_cell_relations()
override;
773 std::vector<types::global_dof_index>
775 std::vector<types::global_dof_index>
782 typename ::internal::p4est::types<dim>::tree *
783 init_tree(
const int dealii_coarse_cell_index)
const;
790 setup_coarse_cell_to_p4est_tree_permutation();
806 copy_local_forest_to_triangulation();
821 std::vector<unsigned int>
822 get_cell_weights()
const;
834 mark_locally_active_vertices_on_level(
const int level)
const;
837 coarse_cell_id_to_coarse_cell_index(
842 const unsigned int coarse_cell_index)
const override;
844 template <
int,
int,
class>
845 friend class ::FETools::internal::ExtrapolateImplementation;
859 template <
int spacedim>
870 default_setting = 0x0,
871 mesh_reconstruction_after_repartitioning = 0x1,
872 construct_multigrid_hierarchy = 0x2,
873 no_automatic_repartitioning = 0x4,
874 communicate_vertices_to_p4est = 0x8
883 const typename ::Triangulation<1, spacedim>::MeshSmoothing
885 const Settings
settings = default_setting);
898 const std::vector<types::global_dof_index> &
899 get_p4est_tree_to_coarse_cell_permutation()
const;
906 load(
const std::string &filename)
override;
914 load(
const std::string &filename,
const bool autopartition)
override;
921 save(
const std::string &filename)
const override;
928 is_multilevel_hierarchy_constructed()
const override;
935 are_vertices_communicated_to_p4est()
const;
942 update_cell_relations()
override;
948 std::vector<types::global_dof_index>
950 std::vector<types::global_dof_index>
957 virtual std::map<unsigned int, std::set<::types::subdomain_id>>
958 compute_level_vertices_with_ghost_neighbors(
959 const unsigned int level)
const;
965 virtual std::vector<bool>
966 mark_locally_active_vertices_on_level(
const unsigned int level)
const;
969 coarse_cell_id_to_coarse_cell_index(
974 const unsigned int coarse_cell_index)
const override;
987 namespace distributed
1002 template <
int dim,
int spacedim = dim>
1026 const typename ::Triangulation<dim, spacedim>::MeshSmoothing
1056 save(
const std::string & )
const override
1064 load(
const std::string & )
override
1073 load(
const std::string & ,
1074 const bool )
override
1094 namespace distributed
1113 template <
int dim,
int spacedim = dim>
~TemporarilyMatchRefineFlags()
const SmartPointer< ::parallel::distributed::Triangulation< dim, spacedim > > distributed_tria
std::vector< bool > saved_refine_flags
std::vector< bool > saved_coarsen_flags
std::vector< types::global_dof_index > p4est_tree_to_coarse_cell_permutation
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation
@ no_automatic_repartitioning
@ construct_multigrid_hierarchy
@ mesh_reconstruction_after_repartitioning
@ communicate_vertices_to_p4est
typename ::Triangulation< dim, spacedim >::CellStatus CellStatus
bool are_vertices_communicated_to_p4est() const
bool triangulation_has_content
std::vector< types::global_dof_index > p4est_tree_to_coarse_cell_permutation
virtual void update_cell_relations() override
void copy_new_triangulation_to_p4est(std::integral_constant< int, 3 >)
typename::internal::p4est::types< dim >::forest * parallel_forest
typename::internal::p4est::types< dim >::connectivity * connectivity
void copy_new_triangulation_to_p4est(std::integral_constant< int, 2 >)
virtual void save(const std::string &filename) const override
bool is_multilevel_hierarchy_constructed() const override
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation
virtual void load(const std::string &filename) override
typename::internal::p4est::types< dim >::ghost * parallel_ghost
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
typename ::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
const TriangulationDescription::Settings settings
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id
const ::Triangulation< dim, spacedim > & tria