PetIBM 0.5.4
Toolbox and applications of the immersed-boundary method for distributed-memory architectures
io.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <string>
11
12#include <petscsys.h>
13
14#include <petibm/singlebody.h>
15#include <petibm/type.h>
16
17namespace petibm
18{
23namespace io
24{
34PetscErrorCode readLagrangianPoints(const std::string &file, PetscInt &nPts,
35 type::RealVec2D &coords);
36
44PetscErrorCode print(const std::string &info);
45
61PetscErrorCode writeHDF5Vecs(const MPI_Comm comm, const std::string &filePath,
62 const std::string &loc,
63 const std::vector<std::string> &names,
64 const std::vector<Vec> &vecs,
65 const PetscFileMode mode = FILE_MODE_WRITE);
66
83PetscErrorCode writeHDF5Vecs(const MPI_Comm comm, const std::string &filePath,
84 const std::string &loc,
85 const std::vector<std::string> &names,
86 const std::vector<PetscInt> &n,
87 const std::vector<PetscReal *> &vecs,
88 const PetscFileMode mode = FILE_MODE_WRITE);
89
105PetscErrorCode writeHDF5Vecs(const MPI_Comm comm, const std::string &filePath,
106 const std::string &loc,
107 const std::vector<std::string> &names,
108 const type::RealVec2D &vecs,
109 const PetscFileMode mode = FILE_MODE_WRITE);
110
125PetscErrorCode readHDF5Vecs(const MPI_Comm comm, const std::string &filePath,
126 const std::string &loc,
127 const std::vector<std::string> &names,
128 std::vector<Vec> &vecs);
129
138PetscErrorCode writePetscLog(const MPI_Comm comm, const std::string &filePath);
139
140} // namespace io
141
142} // namespace petibm
PetscErrorCode writeHDF5Vecs(const MPI_Comm comm, const std::string &filePath, const std::string &loc, const std::vector< std::string > &names, const std::vector< Vec > &vecs, const PetscFileMode mode=FILE_MODE_WRITE)
Write a vector of Vec objects to a HDF5 file.
Definition: io.cpp:137
PetscErrorCode readHDF5Vecs(const MPI_Comm comm, const std::string &filePath, const std::string &loc, const std::vector< std::string > &names, std::vector< Vec > &vecs)
Read a vector of Vec objects from a HDF5 file.
Definition: io.cpp:243
PetscErrorCode readLagrangianPoints(const std::string &file, PetscInt &nPts, type::RealVec2D &coords)
Read the number Lagrangian points and their coordinates from a file.
Definition: io.cpp:23
PetscErrorCode writePetscLog(const MPI_Comm comm, const std::string &filePath)
Write a summary of the PETSc logging into a ASCII file.
Definition: io.cpp:274
PetscErrorCode print(const std::string &info)
Print information of a parallel object to standard output.
Definition: io.cpp:120
std::vector< RealVec1D > RealVec2D
2D std::vector holding PetscReal.
Definition: type.h:142
A toolbox for building flow solvers.
Definition: bodypack.h:52
body::SingleBodyBase, type::SingleBody factory function.
Definition of user-defined types for convenience.