p4est 2.8.6
p4est is a software library for parallel adaptive mesh refinement.
|
Provide functions to serialize/deserialize a forest. More...
#include <p8est.h>
Go to the source code of this file.
Functions | |
sc_array_t * | p8est_deflate_quadrants (p8est_t *p8est, sc_array_t **data) |
This parallel data file format is deprecated since we plan to release an updated version of it soon. More... | |
p8est_t * | p8est_inflate (sc_MPI_Comm mpicomm, p8est_connectivity_t *connectivity, const p4est_gloidx_t *global_first_quadrant, const p4est_gloidx_t *pertree, sc_array_t *quadrants, sc_array_t *data, void *user_pointer) |
Create a new p4est based on serialized data. More... | |
p8est_t * | p8est_inflate_null (sc_MPI_Comm mpicomm, p8est_connectivity_t *connectivity, const p4est_gloidx_t *global_first_quadrant, const p4est_gloidx_t *pertree, sc_array_t *quadrants, sc_array_t *data, void *user_pointer) |
Create a new p4est based on serialized data. More... | |
Provide functions to serialize/deserialize a forest.
Some are used as building blocks for p8est_load and p8est_save. Others allow for saving and loading user-defined data to a parallel file.
Furthermore, this module provides functions to write and read general data files associated with a p8est.
sc_array_t * p8est_deflate_quadrants | ( | p8est_t * | p8est, |
sc_array_t ** | data | ||
) |
This parallel data file format is deprecated since we plan to release an updated version of it soon.
You can still use p8est_load and p8est_save to read and write a p8est including the connectivity and quadrant data. However, you can not read and write external mesh associated data using a p8est function if you do not use the p4est_file functions. If you still want to use the p8est_file functions you can configure with –enable-file-deprecated or use the variable enable-file-deprecated in CMake. Extract processor local quadrants' x y z level data. Optionally extracts the quadrant data as well into a separate array.
[in] | p8est | The forest is not modified. |
[in,out] | data | If not NULL, pointer to a pointer that will be set to a newly allocated array with per-quadrant data. Must be NULL if p4est->data_size == 0. |
p8est_t * p8est_inflate | ( | sc_MPI_Comm | mpicomm, |
p8est_connectivity_t * | connectivity, | ||
const p4est_gloidx_t * | global_first_quadrant, | ||
const p4est_gloidx_t * | pertree, | ||
sc_array_t * | quadrants, | ||
sc_array_t * | data, | ||
void * | user_pointer | ||
) |
Create a new p4est based on serialized data.
Its revision counter is set to zero. See p8est.h and p8est_communication.h for more information on parameters.
[in] | mpicomm | A valid MPI communicator. |
[in] | connectivity | This is the connectivity information that the forest is built with. Note that p4est does not take ownership of the memory. |
[in] | global_first_quadrant | First global quadrant on each proc and one beyond. Copied into global_first_quadrant. Local count on rank is gfq[rank + 1] - gfq[rank]. |
[in] | pertree | The cumulative quadrant counts per tree. |
[in] | quadrants | Array as returned by p8est_deflate_quadrants. |
[in] | data | Array as from p8est_deflate_quadrants or NULL. The elem_size of this array informs data_size. Its elem_count equals the number of local quads. |
[in] | user_pointer | Assign to the user_pointer member of the p4est. |
p8est_t * p8est_inflate_null | ( | sc_MPI_Comm | mpicomm, |
p8est_connectivity_t * | connectivity, | ||
const p4est_gloidx_t * | global_first_quadrant, | ||
const p4est_gloidx_t * | pertree, | ||
sc_array_t * | quadrants, | ||
sc_array_t * | data, | ||
void * | user_pointer | ||
) |
Create a new p4est based on serialized data.
Its revision counter is set to zero. See p8est.h and p8est_communication.h for more information on parameters. In contrast to p8est_inflate this function indicates soft errors by returning NULL.
[in] | mpicomm | A valid MPI communicator. |
[in] | connectivity | This is the connectivity information that the forest is built with. Note that p4est does not take ownership of the memory. |
[in] | global_first_quadrant | First global quadrant on each proc and one beyond. Copied into global_first_quadrant. Local count on rank is gfq[rank + 1] - gfq[rank]. |
[in] | pertree | The cumulative quadrant counts per tree. |
[in] | quadrants | Array as returned by p8est_deflate_quadrants. |
[in] | data | Array as from p8est_deflate_quadrants or NULL. The elem_size of this array informs data_size. Its elem_count equals the number of local quads. |
[in] | user_pointer | Assign to the user_pointer member of the p4est. |