xref: /honee/include/honee-file.h (revision 360b37c96ac5468b4453c10e4cd8c16bd6da1f1e)
1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
3 
4 #include <petsc.h>
5 
6 // Versioning token for binary checkpoints
7 extern const PetscInt32 HONEE_FILE_TOKEN;  // for backwards compatibility
8 extern const PetscInt32 HONEE_FILE_TOKEN_32;
9 extern const PetscInt32 HONEE_FILE_TOKEN_64;
10 
11 PetscErrorCode HoneeLoadBinaryVec(PetscViewer viewer, Vec Q, PetscReal *time, PetscInt *step_number);
12 
13 PetscErrorCode PhastaDatFileOpen(const MPI_Comm comm, const char path[PETSC_MAX_PATH_LEN], const PetscInt char_array_len, PetscInt dims[2],
14                                  FILE **fp);
15 PetscErrorCode PhastaDatFileGetNRows(const MPI_Comm comm, const char path[PETSC_MAX_PATH_LEN], PetscInt *nrows);
16 PetscErrorCode PhastaDatFileReadToArrayReal(const MPI_Comm comm, const char path[PETSC_MAX_PATH_LEN], PetscReal array[]);
17