193ca29b6SJames Wright // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors. 293ca29b6SJames Wright // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause 393ca29b6SJames Wright 4*1c58d510SJames Wright #include <petscdm.h> 5*1c58d510SJames Wright #include <petscdmplex.h> 6*1c58d510SJames Wright #include <petscviewer.h> 793ca29b6SJames Wright 893ca29b6SJames Wright // Versioning token for binary checkpoints 9c9ff4f08SJames Wright extern const PetscInt32 HONEE_FILE_TOKEN; // for backwards compatibility 10c9ff4f08SJames Wright extern const PetscInt32 HONEE_FILE_TOKEN_32; 11c9ff4f08SJames Wright extern const PetscInt32 HONEE_FILE_TOKEN_64; 1293ca29b6SJames Wright 13d85b32c9SJames Wright PetscErrorCode HoneeCheckFilenameExtension(MPI_Comm comm, const char filename[], const char extension[], PetscBool *is_extension); 14d85b32c9SJames Wright 15d114cdedSJames Wright PetscErrorCode HoneeLoadInitialCondition(const char filename[], PetscInt *solution_steps, PetscReal *solution_time, Vec Q); 16360b37c9SJames Wright PetscErrorCode HoneeLoadBinaryVec(PetscViewer viewer, Vec Q, PetscReal *time, PetscInt *step_number); 17b237916aSJames Wright PetscErrorCode HoneeWriteBinaryVec(PetscViewer viewer, Vec Q, PetscReal time, PetscInt step_number); 1893ca29b6SJames Wright 197ce151adSJames Wright PetscErrorCode PhastaDatFileOpen(const MPI_Comm comm, const char path[], const PetscInt char_array_len, PetscInt dims[2], FILE **fp); 207ce151adSJames Wright PetscErrorCode PhastaDatFileGetNRows(const MPI_Comm comm, const char path[], PetscInt *nrows); 217ce151adSJames Wright PetscErrorCode PhastaDatFileReadToArrayReal(const MPI_Comm comm, const char path[], PetscReal array[]); 22