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> 30 #include <deal.II/distributed/p4est_wrappers.h> 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 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);
649 void *)> &pack_callback);
669 const void *)> &unpack_callback);
677 const std::vector<types::global_dof_index> &
685 const std::vector<types::global_dof_index> &
779 typedef std_cxx11::function<
783 typedef std::pair<unsigned int, pack_callback_t> callback_pair_t;
785 typedef std::list<callback_pair_t> callback_list_t;
808 std::vector<types::global_dof_index> p4est_tree_to_coarse_cell_permutation;
814 typename ::internal::p4est::types<dim>::tree *
815 init_tree(
const int dealii_coarse_cell_index)
const;
858 std::vector<unsigned int>
868 (std::map<
unsigned int, std::set<::types::subdomain_id> >
869 &vertices_with_ghost_neighbors);
879 std::map<
unsigned int, std::set<::types::subdomain_id> >
880 &vertices_with_ghost_neighbors);
894 template <
int,
int>
friend class ::internal::DoFHandler::Policy::ParallelDistributed;
896 template <
int,
int,
class>
friend class ::FETools::internal::ExtrapolateImplementation;
905 template <
int spacedim>
926 const std::vector<types::global_dof_index> &
970 std::vector<types::global_dof_index> p4est_tree_to_coarse_cell_permutation;
995 (std::map<
unsigned int, std::set<::types::subdomain_id> >
996 &vertices_with_ghost_neighbors);
1004 (
const unsigned int level,
1005 std::map<
unsigned int, std::set<::types::subdomain_id> >
1006 &vertices_with_ghost_neighbors);
1020 #else // DEAL_II_WITH_P4EST 1024 namespace distributed
1036 template <
int dim,
int spacedim = dim>
1053 DEAL_II_NAMESPACE_CLOSE
std::vector< unsigned int > get_cell_weights()
void fill_vertices_with_ghost_neighbors(std::map< unsigned int, std::set<::types::subdomain_id > > &vertices_with_ghost_neighbors)
typename ::internal::p4est::types< dim >::connectivity * connectivity
unsigned int register_data_attach(const std::size_t size, const std_cxx11::function< void(const cell_iterator &, const CellStatus, void *)> &pack_callback)
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
unsigned int attached_data_size
void notify_ready_to_unpack(const unsigned int offset, const std_cxx11::function< void(const cell_iterator &, const CellStatus, const void *)> &unpack_callback)
void copy_new_triangulation_to_p4est(::internal::int2type< 2 >)
MPI_Comm mpi_communicator
virtual std::size_t memory_consumption_p4est() const
void load(const char *filename, const bool autopartition=true)
callback_list_t attached_data_pack_callbacks
const std::vector< types::global_dof_index > & get_p4est_tree_to_coarse_cell_permutation() const
virtual void add_periodicity(const std::vector< GridTools::PeriodicFacePair< cell_iterator > > &)
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)
void fill_level_vertices_with_ghost_neighbors(const int level, std::map< unsigned int, std::set<::types::subdomain_id > > &vertices_with_ghost_neighbors)
virtual bool prepare_coarsening_and_refinement()
const std::vector< types::global_dof_index > & get_coarse_cell_to_p4est_tree_permutation() const
virtual bool has_hanging_nodes() const
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()
bool refinement_in_progress
::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
void communicate_locally_moved_vertices(const std::vector< bool > &vertex_locally_moved)
unsigned int get_checksum() const
MeshSmoothing smooth_grid
unsigned int n_attached_datas
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)
unsigned int n_attached_deserialize
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