NuSiF-Solver/BasicSolver/3D-mpi/src/vtkWriter.h

36 lines
881 B
C
Raw Normal View History

2023-02-05 07:34:23 +01:00
/*
2024-01-31 17:40:36 +01:00
* Copyright (C) NHR@FAU, University Erlangen-Nuremberg.
2023-02-05 07:34:23 +01:00
* All rights reserved. This file is part of nusif-solver.
* Use of this source code is governed by a MIT style
* license that can be found in the LICENSE file.
*/
#ifndef __VTKWRITER_H_
#define __VTKWRITER_H_
#include <stdio.h>
2024-01-31 17:40:36 +01:00
#include "comm.h"
2023-02-05 07:34:23 +01:00
#include "grid.h"
typedef enum VtkFormat { ASCII = 0, BINARY } VtkFormat;
typedef struct VtkOptions {
Grid grid;
2024-01-31 17:40:36 +01:00
#ifdef _VTK_WRITER_MPI
MPI_File fh;
#else
2023-02-05 07:34:23 +01:00
FILE* fh;
2024-01-31 17:40:36 +01:00
VtkFormat fmt;
#endif // _VTK_WRITER_MPI
Comm comm;
2023-02-05 07:34:23 +01:00
} VtkOptions;
typedef struct VtkVector {
double *u, *v, *w;
} VtkVector;
extern void vtkOpen(VtkOptions* opts, char* filename);
extern void vtkVector(VtkOptions* opts, char* name, VtkVector vec);
extern void vtkScalar(VtkOptions* opts, char* name, double* p);
extern void vtkClose(VtkOptions* opts);
#endif // __VTKWRITER_H_