xref: /honee/include/honee-file.h (revision d114cded06aa31386422f7df75c9dc124f37a0f3)
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 
11d85b32c9SJames Wright PetscErrorCode HoneeCheckFilenameExtension(MPI_Comm comm, const char filename[], const char extension[], PetscBool *is_extension);
12d85b32c9SJames Wright 
13*d114cdedSJames Wright PetscErrorCode HoneeLoadInitialCondition(const char filename[], PetscInt *solution_steps, PetscReal *solution_time, Vec Q);
14360b37c9SJames Wright PetscErrorCode HoneeLoadBinaryVec(PetscViewer viewer, Vec Q, PetscReal *time, PetscInt *step_number);
15b237916aSJames Wright PetscErrorCode HoneeWriteBinaryVec(PetscViewer viewer, Vec Q, PetscReal time, PetscInt step_number);
1693ca29b6SJames Wright 
177ce151adSJames Wright PetscErrorCode PhastaDatFileOpen(const MPI_Comm comm, const char path[], const PetscInt char_array_len, PetscInt dims[2], FILE **fp);
187ce151adSJames Wright PetscErrorCode PhastaDatFileGetNRows(const MPI_Comm comm, const char path[], PetscInt *nrows);
197ce151adSJames Wright PetscErrorCode PhastaDatFileReadToArrayReal(const MPI_Comm comm, const char path[], PetscReal array[]);
20