xref: /honee/include/honee-file.h (revision 7ce151ad65b97e4c1c7f0d2f18dd6d212bf8dcf3)
193ca29b6SJames Wright // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
293ca29b6SJames Wright // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
393ca29b6SJames Wright 
493ca29b6SJames Wright #include <petsc.h>
593ca29b6SJames Wright 
693ca29b6SJames Wright // Versioning token for binary checkpoints
7c9ff4f08SJames Wright extern const PetscInt32 HONEE_FILE_TOKEN;  // for backwards compatibility
8c9ff4f08SJames Wright extern const PetscInt32 HONEE_FILE_TOKEN_32;
9c9ff4f08SJames Wright extern const PetscInt32 HONEE_FILE_TOKEN_64;
1093ca29b6SJames Wright 
11360b37c9SJames Wright PetscErrorCode HoneeLoadBinaryVec(PetscViewer viewer, Vec Q, PetscReal *time, PetscInt *step_number);
12b237916aSJames Wright PetscErrorCode HoneeWriteBinaryVec(PetscViewer viewer, Vec Q, PetscReal time, PetscInt step_number);
1393ca29b6SJames Wright 
14*7ce151adSJames Wright PetscErrorCode PhastaDatFileOpen(const MPI_Comm comm, const char path[], const PetscInt char_array_len, PetscInt dims[2], FILE **fp);
15*7ce151adSJames Wright PetscErrorCode PhastaDatFileGetNRows(const MPI_Comm comm, const char path[], PetscInt *nrows);
16*7ce151adSJames Wright PetscErrorCode PhastaDatFileReadToArrayReal(const MPI_Comm comm, const char path[], PetscReal array[]);
17