|
| CellAttachedDataSerializer () |
|
void | pack_data (const std::vector< cell_relation_t > &cell_relations, const std::vector< typename internal::CellAttachedData< dim, spacedim >::pack_callback_t > &pack_callbacks_fixed, const std::vector< typename internal::CellAttachedData< dim, spacedim >::pack_callback_t > &pack_callbacks_variable, const MPI_Comm &mpi_communicator) |
|
void | unpack_cell_status (std::vector< cell_relation_t > &cell_relations) const |
|
void | unpack_data (const std::vector< cell_relation_t > &cell_relations, const unsigned int handle, const std::function< void(const cell_iterator &, const CellStatus &, const boost::iterator_range< std::vector< char >::const_iterator > &)> &unpack_callback) const |
|
void | save (const unsigned int global_first_cell, const unsigned int global_num_cells, const std::string &filename, const MPI_Comm &mpi_communicator) const |
|
void | load (const unsigned int global_first_cell, const unsigned int global_num_cells, const unsigned int local_num_cells, const std::string &filename, const unsigned int n_attached_deserialize_fixed, const unsigned int n_attached_deserialize_variable, const MPI_Comm &mpi_communicator) |
|
void | clear () |
|
template<int dim, int spacedim = dim>
class internal::CellAttachedDataSerializer< dim, spacedim >
A structure that stores information about the data that has been, or will be, attached to cells via the register_data_attach() function and later retrieved via notify_ready_to_unpack().
This internalclass is dedicated to the data serialization and transfer across repartitioned meshes and to/from the file system.
It is designed to store all data buffers intended for serialization.
Definition at line 378 of file tria.h.
template<int dim, int spacedim>
Prepare data serialization by calling the pack callback functions on each cell in cell_relations
.
All registered callback functions in pack_callbacks_fixed
will write into the fixed size buffer, whereas each entry of pack_callbacks_variable
will write its data into the variable size buffer.
Definition at line 140 of file tria.cc.
template<int dim, int spacedim = dim>
Unpack previously serialized data on each cell registered in 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 deserialized from the file system via load().
Definition at line 504 of file tria.cc.
template<int dim, int spacedim>
void internal::CellAttachedDataSerializer< dim, spacedim >::save |
( |
const unsigned int |
global_first_cell, |
|
|
const unsigned int |
global_num_cells, |
|
|
const std::string & |
filename, |
|
|
const MPI_Comm & |
mpi_communicator |
|
) |
| const |
Serialize 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.
If MPI support is enabled, all processors write into these files simultaneously via MPIIO. Each processor's position to write to will be determined from the provided input parameters.
Data has to be previously packed with pack_data().
Definition at line 671 of file tria.cc.
template<int dim, int spacedim>
void internal::CellAttachedDataSerializer< dim, spacedim >::load |
( |
const unsigned int |
global_first_cell, |
|
|
const unsigned int |
global_num_cells, |
|
|
const unsigned int |
local_num_cells, |
|
|
const std::string & |
filename, |
|
|
const unsigned int |
n_attached_deserialize_fixed, |
|
|
const unsigned int |
n_attached_deserialize_variable, |
|
|
const MPI_Comm & |
mpi_communicator |
|
) |
| |
Deserialize 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.
If MPI support is enabled, all processors read from these files simultaneously via MPIIO. Each processor's position to read from will be determined from the provided input arguments.
After loading, unpack_data() needs to be called to finally distribute data across the associated triangulation.
Definition at line 900 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 514 of file tria.h.