51#ifdef P4EST_ENABLE_FILE_DEPRECATED
53#define P8EST_FILE_MAGIC_NUMBER "p8data0"
54#define P8EST_FILE_METADATA_BYTES 96
55#define P8EST_FILE_MAGIC_BYTES 8
56#define P8EST_FILE_VERSION_STR_BYTES 24
57#define P8EST_FILE_ARRAY_METADATA_BYTES 14
59#define P8EST_FILE_ARRAY_METADATA_CHARS (P8EST_FILE_ARRAY_METADATA_BYTES - 2)
60#define P8EST_FILE_BYTE_DIV 16
61#define P8EST_FILE_MAX_NUM_PAD_BYTES (P8EST_FILE_BYTE_DIV + 1)
68#define P8EST_FILE_USER_STRING_BYTES 48
69#define P8EST_FILE_FIELD_HEADER_BYTES (2 + P8EST_FILE_ARRAY_METADATA_BYTES + P8EST_FILE_USER_STRING_BYTES)
71#define P8EST_FILE_MAX_GLOBAL_QUAD 9999999999999999
72#define P8EST_FILE_MAX_BLOCK_SIZE 9999999999999
73#define P8EST_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 p8est_file_context p8est_file_context_t;
197typedef enum p8est_file_error
199 P8EST_FILE_ERR_SUCCESS = sc_MPI_ERR_LASTCODE,
201 P8EST_FILE_ERR_NOT_SAME,
202 P8EST_FILE_ERR_AMODE,
203 P8EST_FILE_ERR_NO_SUCH_FILE,
204 P8EST_FILE_ERR_FILE_EXIST,
205 P8EST_FILE_ERR_BAD_FILE,
206 P8EST_FILE_ERR_ACCESS,
207 P8EST_FILE_ERR_NO_SPACE,
208 P8EST_FILE_ERR_QUOTA,
209 P8EST_FILE_ERR_READ_ONLY,
210 P8EST_FILE_ERR_IN_USE,
212 P8EST_FILE_ERR_FORMAT,
213 P8EST_FILE_ERR_SECTION_TYPE,
215 P8EST_FILE_ERR_P8EST,
216 P8EST_FILE_ERR_IN_DATA,
217 P8EST_FILE_ERR_COUNT,
219 P8EST_FILE_ERR_UNKNOWN,
220 P8EST_FILE_ERR_LASTCODE
270p8est_file_context_t *p8est_file_open_create
272 const char *user_string,
int *errcode);
304p8est_file_context_t *p8est_file_open_read (
p8est_t *
p8est,
305 const char *filename,
306 char *user_string,
int *errcode);
348p8est_file_context_t *p8est_file_write_block (p8est_file_context_t * fc,
350 sc_array_t * block_data,
351 const char *user_string,
402p8est_file_context_t *p8est_file_read_block (p8est_file_context_t * fc,
404 sc_array_t * header_data,
405 char *user_string,
int *errcode);
455p8est_file_context_t *p8est_file_write_field (p8est_file_context_t * fc,
456 size_t quadrant_size,
457 sc_array_t * quadrant_data,
458 const char *user_string,
514p8est_file_context_t *p8est_file_read_field (p8est_file_context_t * fc,
515 size_t quadrant_size,
516 sc_array_t * quadrant_data,
517 char *user_string,
int *errcode);
521typedef struct p8est_file_section_metadata
526 char user_string[P8EST_FILE_USER_STRING_BYTES];
528p8est_file_section_metadata_t;
575int p8est_file_info (
p8est_t *
p8est,
const char *filename,
577 sc_array_t * data_sections,
589int p8est_file_error_string (
int errclass,
590 char *
string,
int *resultlen);
632p8est_file_context_t *p8est_file_write_p8est (p8est_file_context_t * fc,
634 const char *quad_string,
635 const char *quad_data_string,
663p8est_file_context_t *p8est_file_read_p8est (p8est_file_context_t * fc,
668 char *quad_data_string,
699p8est_file_context_t *p8est_file_write_connectivity (p8est_file_context_t *
703 const char *conn_string,
727p8est_file_context_t *p8est_file_read_connectivity (p8est_file_context_t * fc,
729 conn,
char *conn_string,
746int p8est_file_close (p8est_file_context_t * fc,
int64_t p4est_gloidx_t
Typedef for globally unique indexing of quadrants.
Definition: p4est_base.h:118
The top-level 3D p8est interface.
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.
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.
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.
This structure holds the 3D inter-tree connectivity information.
Definition: p8est_connectivity.h:215
The p8est forest datatype.
Definition: p8est.h:132