51#ifdef P4EST_ENABLE_FILE_DEPRECATED
53#define P4EST_FILE_MAGIC_NUMBER "p4data0"
54#define P4EST_FILE_METADATA_BYTES 96
55#define P4EST_FILE_MAGIC_BYTES 8
56#define P4EST_FILE_VERSION_STR_BYTES 24
57#define P4EST_FILE_ARRAY_METADATA_BYTES 14
59#define P4EST_FILE_ARRAY_METADATA_CHARS (P4EST_FILE_ARRAY_METADATA_BYTES - 2)
60#define P4EST_FILE_BYTE_DIV 16
61#define P4EST_FILE_MAX_NUM_PAD_BYTES (P4EST_FILE_BYTE_DIV + 1)
68#define P4EST_FILE_USER_STRING_BYTES 48
69#define P4EST_FILE_FIELD_HEADER_BYTES (2 + P4EST_FILE_ARRAY_METADATA_BYTES + P4EST_FILE_USER_STRING_BYTES)
71#define P4EST_FILE_MAX_GLOBAL_QUAD 9999999999999999
72#define P4EST_FILE_MAX_BLOCK_SIZE 9999999999999
73#define P4EST_FILE_MAX_FIELD_ENTRY_SIZE 9999999999999
111 global_first_quadrant,
113 sc_array_t * quadrants, sc_array_t * data,
141 global_first_quadrant,
143 sc_array_t * quadrants,
147#ifdef P4EST_ENABLE_FILE_DEPRECATED
193typedef struct p4est_file_context p4est_file_context_t;
197typedef enum p4est_file_error
199 P4EST_FILE_ERR_SUCCESS = sc_MPI_ERR_LASTCODE,
201 P4EST_FILE_ERR_NOT_SAME,
202 P4EST_FILE_ERR_AMODE,
203 P4EST_FILE_ERR_NO_SUCH_FILE,
204 P4EST_FILE_ERR_FILE_EXIST,
205 P4EST_FILE_ERR_BAD_FILE,
206 P4EST_FILE_ERR_ACCESS,
207 P4EST_FILE_ERR_NO_SPACE,
208 P4EST_FILE_ERR_QUOTA,
209 P4EST_FILE_ERR_READ_ONLY,
210 P4EST_FILE_ERR_IN_USE,
212 P4EST_FILE_ERR_FORMAT,
213 P4EST_FILE_ERR_SECTION_TYPE,
215 P4EST_FILE_ERR_P4EST,
216 P4EST_FILE_ERR_IN_DATA,
217 P4EST_FILE_ERR_COUNT,
219 P4EST_FILE_ERR_UNKNOWN,
220 P4EST_FILE_ERR_LASTCODE
270p4est_file_context_t *p4est_file_open_create
272 const char *user_string,
int *errcode);
304p4est_file_context_t *p4est_file_open_read (
p4est_t *
p4est,
305 const char *filename,
306 char *user_string,
int *errcode);
348p4est_file_context_t *p4est_file_write_block (p4est_file_context_t * fc,
350 sc_array_t * block_data,
351 const char *user_string,
402p4est_file_context_t *p4est_file_read_block (p4est_file_context_t * fc,
404 sc_array_t * header_data,
405 char *user_string,
int *errcode);
453p4est_file_context_t *p4est_file_write_field (p4est_file_context_t * fc,
454 size_t quadrant_size,
455 sc_array_t * quadrant_data,
456 const char *user_string,
513p4est_file_context_t *p4est_file_read_field (p4est_file_context_t * fc,
514 size_t quadrant_size,
515 sc_array_t * quadrant_data,
516 char *user_string,
int *errcode);
520typedef struct p4est_file_section_metadata
525 char user_string[P4EST_FILE_USER_STRING_BYTES];
527p4est_file_section_metadata_t;
574int p4est_file_info (
p4est_t *
p4est,
const char *filename,
576 sc_array_t * data_sections,
588int p4est_file_error_string (
int errclass,
589 char *
string,
int *resultlen);
631p4est_file_context_t *p4est_file_write_p4est (p4est_file_context_t * fc,
633 const char *quad_string,
634 const char *quad_data_string,
662p4est_file_context_t *p4est_file_read_p4est (p4est_file_context_t * fc,
667 char *quad_data_string,
698p4est_file_context_t *p4est_file_write_connectivity (p4est_file_context_t *
702 const char *conn_string,
726p4est_file_context_t *p4est_file_read_connectivity (p4est_file_context_t * fc,
728 conn,
char *conn_string,
745int p4est_file_close (p4est_file_context_t * fc,
The top-level 2D p4est interface.
int64_t p4est_gloidx_t
Typedef for globally unique indexing of quadrants.
Definition: p4est_base.h:118
sc_array_t * p4est_deflate_quadrants(p4est_t *p4est, sc_array_t **data)
This parallel data file format is deprecated since we plan to release an updated version of it soon.
p4est_t * p4est_inflate_null(sc_MPI_Comm mpicomm, p4est_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.
p4est_t * p4est_inflate(sc_MPI_Comm mpicomm, p4est_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.
This structure holds the 2D inter-tree connectivity information.
Definition: p4est_connectivity.h:190
The p4est forest datatype.
Definition: p4est.h:136