mantaflow  0.10
A framework for fluid simulation
fileio.h
Go to the documentation of this file.
1 
2 /******************************************************************************
3  *
4  * MantaFlow fluid solver framework
5  * Copyright 2011 Tobias Pfaff, Nils Thuerey
6  *
7  * This program is free software, distributed under the terms of the
8  * GNU General Public License (GPL)
9  * http://www.gnu.org/licenses
10  *
11  * Loading and writing grids and meshes to disk
12  *
13  ******************************************************************************/
14 
15 #ifndef _FILEIO_H
16 #define _FILEIO_H
17 
18 #include <string>
19 
20 namespace Manta {
21 
22 // forward decl.
23 class Mesh;
24 class FlagGrid;
25 template<class T> class Grid;
26 template<class T> class Grid4d;
28 template<class T> class ParticleDataImpl;
29 
30 void writeObjFile(const std::string& name, Mesh* mesh);
31 void writeBobjFile(const std::string& name, Mesh* mesh);
32 void readObjFile(const std::string& name, Mesh* mesh, bool append);
33 void readBobjFile(const std::string& name, Mesh* mesh, bool append);
34 
35 template<class T> void writeGridRaw(const std::string& name, Grid<T>* grid);
36 template<class T> void writeGridUni(const std::string& name, Grid<T>* grid);
37 template<class T> void writeGridVol(const std::string& name, Grid<T>* grid);
38 template<class T> void writeGridTxt(const std::string& name, Grid<T>* grid);
39 
40 template<class T> void readGridUni (const std::string& name, Grid<T>* grid);
41 template<class T> void readGridRaw (const std::string& name, Grid<T>* grid);
42 template<class T> void readGridVol (const std::string& name, Grid<T>* grid);
43 
44 template<class T> void writeGrid4dUni(const std::string& name, Grid4d<T>* grid);
45 template<class T> void readGrid4dUni (const std::string& name, Grid4d<T>* grid, int readTslice=-1, Grid4d<T>* slice=NULL, void** fileHandle=NULL);
46 void readGrid4dUniCleanup(void** fileHandle);
47 template<class T> void writeGrid4dRaw(const std::string& name, Grid4d<T>* grid);
48 template<class T> void readGrid4dRaw (const std::string& name, Grid4d<T>* grid);
49 
50 void writeParticlesUni(const std::string& name, const BasicParticleSystem* parts );
51 void readParticlesUni (const std::string& name, BasicParticleSystem* parts );
52 
53 template <class T> void writePdataUni(const std::string& name, ParticleDataImpl<T>* pdata );
54 template <class T> void readPdataUni (const std::string& name, ParticleDataImpl<T>* pdata );
55 
56 void getUniFileSize(const std::string& name, int& x, int& y, int& z, int* t = NULL, std::string* info = NULL);
57 
58 } // namespace
59 
60 #endif
61 
62 
Definition: commonkernels.h:22
Definition: fileio.h:28
Definition: fileio.h:26
Definition: fileio.h:25
void getUniFileSize(const string &name, int &x, int &y, int &z, int *t, std::string *info)
for auto-init & check of results of test runs , optionally returns info string of header ...
Definition: fileio.cpp:609
Triangle mesh class.
Definition: mesh.h:126
void readGrid4dUni(const string &name, Grid4d< T > *grid, int readTslice, Grid4d< T > *slice, void **fileHandle)
Definition: fileio.cpp:918
Definition: particle.h:187