|
| DataTransfer (MPI_Comm mpi_communicator) |
|
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) |
|
void | execute_transfer (const typename ::internal::p4est::types< dim >::forest *parallel_forest, const typename ::internal::p4est::types< dim >::gloidx *previous_global_first_quadrant) |
|
void | unpack_cell_status (std::vector< quadrant_cell_relation_t > &quad_cell_relations) const |
|
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 |
|
void | save (const typename ::internal::p4est::types< dim >::forest *parallel_forest, const std::string &filename) const |
|
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) |
|
void | clear () |
|
template<int dim, int spacedim = dim>
class parallel::distributed::Triangulation< dim, spacedim >::DataTransfer
This class in the private scope of parallel::distributed::Triangulation is dedicated to the data transfer across repartitioned meshes and to the file system.
It is designed to store all data buffers intended for transfer separated from the parallel_forest and to interface with p4est where it is absolutely necessary.
Definition at line 968 of file tria.h.
template<int dim, int spacedim>
Transfer data across forests.
Besides the actual parallel_forest
, which has been already refined and repartitioned, this function also needs information about its previous state, i.e. the locally owned intervals in p4est's sc_array of each processor. This information needs to be memcopyied out of the old p4est object and has to be provided via the parameter previous_global_first_quadrant
.
Data has to be previously packed with pack_data().
Definition at line 1469 of file tria.cc.
template<int dim, int spacedim>
Unpack previously transferred data on each cell registered in quad_cell_relations
with the provided unpack_callback
function.
The parameter handle
corresponds to the position where the unpack_callback
function is allowed to read from the memory. Its value needs to be in accordance with the corresponding pack_callback function that has been registered previously.
Data has to be previously transferred with execute_transfer() or read from the file system via load().
Definition at line 1598 of file tria.cc.
template<int dim, int spacedim>
Transfer data to file system.
The data will be written in a separate file, whose name consists of the stem filename
and an attached identifier -fixed.data
for fixed size data and -variable.data
for variable size data.
All processors write into these files simultaneously via MPIIO. Each processor's position to write to will be determined from the provided parallel_forest
.
Data has to be previously packed with pack_data().
Definition at line 1765 of file tria.cc.
template<int dim, int spacedim>
Transfer data from file system.
The data will be read from separate file, whose name consists of the stem filename
and an attached identifier -fixed.data
for fixed size data and -variable.data
for variable size data. The n_attached_deserialize_fixed
and n_attached_deserialize_variable
parameters are required to gather the memory offsets for each callback.
All processors read from these files simultaneously via MPIIO. Each processor's position to read from will be determined from the provided parallel_forest
.
After loading, unpack_data() needs to be called to finally distribute data across the associated triangulation.
Definition at line 1928 of file tria.cc.
template<int dim, int spacedim = dim>
Cumulative size in bytes that those functions that have called register_data_attach() want to attach to each cell. This number only pertains to fixed-sized buffers where the data attached to each cell has exactly the same size.
The last entry of this container corresponds to the data size packed per cell in the fixed size buffer (which can be accessed calling sizes_fixed_cumulative.back()
).
Definition at line 1114 of file tria.h.