|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_distributed_tria_h
17 #define dealii_distributed_tria_h
31 #include <boost/range/iterator_range.hpp>
37 #include <type_traits>
41 #ifdef DEAL_II_WITH_MPI
45 #ifdef DEAL_II_WITH_P4EST
47 # include <p4est_connectivity.h>
48 # include <p4est_ghost.h>
50 # include <p8est_connectivity.h>
51 # include <p8est_ghost.h>
57 #ifdef DEAL_II_WITH_P4EST
66 template <
int,
int,
class>
67 class ExtrapolateImplementation;
74 template <
typename CellIterator>
75 struct PeriodicFacePair;
241 template <
int dim,
int spacedim = dim>
264 typename ::Triangulation<dim, spacedim>::cell_iterator;
285 typename ::Triangulation<dim, spacedim>::active_cell_iterator;
288 typename ::Triangulation<dim, spacedim>::CellStatus;
358 const typename ::Triangulation<dim, spacedim>::MeshSmoothing
393 const ::Triangulation<dim, spacedim> &other_tria)
override;
417 &construction_data)
override;
557 const std::vector<bool> &vertex_locally_moved);
617 save(
const std::string &filename)
const;
638 load(
const std::string &filename,
const bool autopartition =
true);
752 const bool returns_variable_size_data);
804 const unsigned int handle,
805 const std::function<
void(
808 const boost::iterator_range<std::vector<char>::const_iterator> &)>
817 const std::vector<types::global_dof_index> &
825 const std::vector<types::global_dof_index> &
835 const typename ::internal::p4est::types<dim>::forest *
933 typename ::internal::p4est::types<dim>::quadrant *,
984 const std::vector<quadrant_cell_relation_t> &quad_cell_relations,
985 const std::vector<typename CellAttachedData::pack_callback_t>
986 &pack_callbacks_fixed,
987 const std::vector<typename CellAttachedData::pack_callback_t>
988 &pack_callbacks_variable);
1004 const typename ::internal::p4est::types<dim>::forest
1006 const typename ::internal::p4est::types<dim>::gloidx
1007 *previous_global_first_quadrant);
1018 std::vector<quadrant_cell_relation_t> &quad_cell_relations)
const;
1034 const std::vector<quadrant_cell_relation_t> &quad_cell_relations,
1035 const unsigned int handle,
1036 const std::function<
void(
1037 const typename ::Triangulation<dim, spacedim>::cell_iterator
1039 const typename ::Triangulation<dim, spacedim>::CellStatus &,
1040 const boost::iterator_range<std::vector<char>::const_iterator> &)>
1041 &unpack_callback)
const;
1058 save(
const typename ::internal::p4est::types<dim>::forest
1060 const std::string &filename)
const;
1081 load(
const typename ::internal::p4est::types<dim>::forest
1083 const std::string &filename,
1084 const unsigned int n_attached_deserialize_fixed,
1085 const unsigned int n_attached_deserialize_variable);
1148 std::vector<types::global_dof_index>
1150 std::vector<types::global_dof_index>
1157 typename ::internal::p4est::types<dim>::tree *
1158 init_tree(
const int dealii_coarse_cell_index)
const;
1198 std::vector<unsigned int>
1213 virtual unsigned int
1219 const unsigned int coarse_cell_index)
const override;
1221 template <
int,
int,
class>
1222 friend class ::FETools::internal::ExtrapolateImplementation;
1231 template <
int spacedim>
1252 const typename ::Triangulation<1, spacedim>::MeshSmoothing
1267 const std::vector<types::global_dof_index> &
1305 const std::vector<bool> &vertex_locally_moved);
1312 load(
const std::string &filename,
const bool autopartition =
true);
1319 save(
const std::string &filename)
const;
1330 const std::function<std::vector<char>(
1331 const typename ::Triangulation<1, spacedim>::cell_iterator &,
1332 const typename ::Triangulation<1, spacedim>::CellStatus)>
1334 const bool returns_variable_size_data);
1342 const unsigned int handle,
1343 const std::function<
void(
1344 const typename ::Triangulation<1, spacedim>::cell_iterator &,
1345 const typename ::Triangulation<1, spacedim>::CellStatus,
1346 const boost::iterator_range<std::vector<char>::const_iterator> &)>
1353 std::vector<types::global_dof_index>
1355 std::vector<types::global_dof_index>
1362 virtual std::map<unsigned int, std::set<::types::subdomain_id>>
1363 compute_level_vertices_with_ghost_neighbors(
1364 const unsigned int level)
const;
1370 virtual std::vector<bool>
1373 virtual unsigned int
1379 const unsigned int coarse_cell_index)
const override;
1385 #else // DEAL_II_WITH_P4EST
1389 namespace distributed
1402 template <
int dim,
int spacedim = dim>
virtual void clear() override
void unpack_cell_status(std::vector< quadrant_cell_relation_t > &quad_cell_relations) const
bool triangulation_has_content
std::function< std::vector< char >(typename Triangulation< dim, spacedim >::cell_iterator, CellStatus)> pack_callback_t
Triangulation(MPI_Comm mpi_communicator, const typename ::Triangulation< dim, spacedim >::MeshSmoothing smooth_grid=(::Triangulation< dim, spacedim >::none), const Settings settings=default_setting)
virtual void add_periodicity(const std::vector<::GridTools::PeriodicFacePair< cell_iterator >> &) override
typename ::internal::p4est::types< dim >::connectivity * connectivity
MPI_Comm mpi_communicator
virtual void execute_coarsening_and_refinement() override
void update_quadrant_cell_relations()
std::vector< int > dest_sizes_variable
void save(const typename ::internal::p4est::types< dim >::forest *parallel_forest, const std::string &filename) const
std::vector< pack_callback_t > pack_callbacks_variable
const std::vector< types::global_dof_index > & get_p4est_tree_to_coarse_cell_permutation() const
std::vector< pack_callback_t > pack_callbacks_fixed
void load(const std::string &filename, const bool autopartition=true)
std::vector< int > src_sizes_variable
CellAttachedData cell_attached_data
unsigned int n_attached_data_sets
std::vector< unsigned int > get_cell_weights() const
const std::vector< types::global_dof_index > & get_coarse_cell_to_p4est_tree_permutation() const
void execute_transfer(const typename ::internal::p4est::types< dim >::forest *parallel_forest, const typename ::internal::p4est::types< dim >::gloidx *previous_global_first_quadrant)
typename ::internal::p4est::types< dim >::forest * parallel_forest
void notify_ready_to_unpack(const unsigned int handle, const std::function< void(const cell_iterator &, const CellStatus, const boost::iterator_range< std::vector< char >::const_iterator > &)> &unpack_callback)
unsigned int n_attached_deserialize
typename ::Triangulation< dim, dim >::CellStatus CellStatus
virtual unsigned int coarse_cell_id_to_coarse_cell_index(const types::coarse_cell_id coarse_cell_id) const override
std::vector< char > src_data_fixed
typename ::internal::p4est::types< dim >::ghost * parallel_ghost
void load(const typename ::internal::p4est::types< dim >::forest *parallel_forest, const std::string &filename, const unsigned int n_attached_deserialize_fixed, const unsigned int n_attached_deserialize_variable)
virtual types::coarse_cell_id coarse_cell_index_to_coarse_cell_id(const unsigned int coarse_cell_index) const override
const typename ::internal::p4est::types< dim >::forest * get_p4est() const
void write_mesh_vtk(const std::string &file_basename) const
typename std::tuple< typename ::internal::p4est::types< dim >::quadrant *, CellStatus, cell_iterator > quadrant_cell_relation_t
void save(const std::string &filename) const
virtual std::size_t memory_consumption_p4est() const
virtual bool prepare_coarsening_and_refinement() override
std::vector< unsigned int > sizes_fixed_cumulative
#define DEAL_II_NAMESPACE_OPEN
@ no_automatic_repartitioning
void unpack_data(const std::vector< quadrant_cell_relation_t > &quad_cell_relations, const unsigned int handle, const std::function< void(const typename ::Triangulation< dim, spacedim >::cell_iterator &, const typename ::Triangulation< dim, spacedim >::CellStatus &, const boost::iterator_range< std::vector< char >::const_iterator > &)> &unpack_callback) const
@ construct_multigrid_hierarchy
typename ::internal::p4est::types< dim >::tree * init_tree(const int dealii_coarse_cell_index) const
std::vector< types::global_dof_index > p4est_tree_to_coarse_cell_permutation
virtual std::size_t memory_consumption() const override
std::vector< types::global_dof_index > p4est_tree_to_coarse_cell_permutation
std::vector< char > src_data_variable
void pack_data(const std::vector< quadrant_cell_relation_t > &quad_cell_relations, const std::vector< typename CellAttachedData::pack_callback_t > &pack_callbacks_fixed, const std::vector< typename CellAttachedData::pack_callback_t > &pack_callbacks_variable)
unsigned int get_checksum() const
@ mesh_reconstruction_after_repartitioning
std::vector< bool > mark_locally_active_vertices_on_level(const int level) const
global_cell_index coarse_cell_id
std::vector< char > dest_data_fixed
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
virtual ~Triangulation() override
void setup_coarse_cell_to_p4est_tree_permutation()
DataTransfer data_transfer
void communicate_locally_moved_vertices(const std::vector< bool > &vertex_locally_moved)
bool is_multilevel_hierarchy_constructed() const override
std::vector< char > dest_data_variable
MPI_Comm mpi_communicator
std::vector< Point< spacedim > > vertices
void copy_new_triangulation_to_p4est(std::integral_constant< int, 2 >)
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &other_tria) override
DataTransfer(MPI_Comm mpi_communicator)
virtual void create_triangulation(const std::vector< Point< spacedim >> &vertices, const std::vector< CellData< dim >> &cells, const SubCellData &subcelldata) override
unsigned int register_data_attach(const std::function< std::vector< char >(const cell_iterator &, const CellStatus)> &pack_callback, const bool returns_variable_size_data)
#define DEAL_II_NAMESPACE_CLOSE
std::vector< quadrant_cell_relation_t > local_quadrant_cell_relations
bool variable_size_data_stored
virtual bool has_hanging_nodes() const override
MeshSmoothing smooth_grid
void copy_local_forest_to_triangulation()
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation
typename ::Triangulation< dim, dim >::active_cell_iterator active_cell_iterator
std::vector< types::global_dof_index > coarse_cell_to_p4est_tree_permutation