GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
fileIO.h
Go to the documentation of this file.
1 //##############################################################################
16  //##############################################################################
17 
18 #ifndef FILEIO_H
19 #define FILEIO_H
20 #include "../include/ds.h"
21 #include "../include/tracker.h"
22 #include <vector>
23 #include <string>
24 
26 namespace FileIO {
27 
38  double2 *readIn(std::string fileR, std::string fileI, int gSize);
39 
50  void writeOut(std::string buffer, std::string file, double2 *data, int length, int step);
51 
62  void writeOutDouble(std::string buffer, std::string file, double *data,
63  int length, int step);
64 
75  void writeOutBool(std::string buffer, std::string file, bool *data,
76  int length, int step);
77 
78 
89  void writeOutInt(std::string buffer, std::string file, int *data,
90  int length, int step);
91 
102  void writeOutInt2(std::string buffer, std::string file, int2 *data,
103  int length, int step);
104 
114  void writeOutVortex(std::string buffer, std::string file,
115  std::vector<std::shared_ptr<Vtx::Vortex>> &data, int step);
116 
125  void writeOutParam(std::string buffer, Grid &par, std::string file);
126 
127  /*
128  * @brief Opens and closes file. Nothing more. Nothing less.
129  * @param file Name of file to open
130  * @return int 0. That's all.
131  */
132  int readState(std::string name);
133 
145  void writeOutAdjMat(std::string buffer, std::string file, int *mat, unsigned int *uids, int dim, int step);
146 
158  void writeOutAdjMat(std::string buffer, std::string file, double *mat,
159  unsigned int *uids, int dim, int step);
160 }
161 #endif
void writeOutVortex(std::string buffer, std::string file, std::vector< std::shared_ptr< Vtx::Vortex >> &data, int step)
Writes the specified Vtx::Vortex array to a text file.
void writeOutBool(std::string buffer, std::string file, bool *data, int length, int step)
Writes the specified double array to a text file.
void writeOutInt2(std::string buffer, std::string file, int2 *data, int length, int step)
Writes the specified int2 array to a text file.
int readState(std::string name)
Definition: fileIO.h:26
void writeOutAdjMat(std::string buffer, std::string file, int *mat, unsigned int *uids, int dim, int step)
Write adjacency matrix of ints to a file in Mathematica readable format.
void writeOutParam(std::string buffer, Grid &par, std::string file)
Writes the parameter file.
void writeOutDouble(std::string buffer, std::string file, double *data, int length, int step)
Writes the specified double array to a text file.
% Indexing needs to % be modified if you wish to use the ordered data sets % Calculate the Voronoi diagram of the resulting data
Definition: VtxCorr.m:36
double2 * readIn(std::string fileR, std::string fileI, int gSize)
Reads in the real and imaginary components from text files.
void writeOut(std::string buffer, std::string file, double2 *data, int length, int step)
Writes the specified double2 array to a text file.
Class to hold the variable map and grid information.
Definition: ds.h:86
def par
Definition: plot.py:237
% Prealloc may improve speed here end save Ek mat
Definition: kinSpec.m:21
void writeOutInt(std::string buffer, std::string file, int *data, int length, int step)
Writes the specified int array to a text file.
length
Definition: vort.py:75