GPUE  v1.0
GPU Gross-Pitaevskii Equation numerical solver for Bose-Einstein condensates
FileIO Namespace Reference

Functions

double2 * readIn (std::string fileR, std::string fileI, int gSize)
 Reads in the real and imaginary components from text files. More...
 
void writeOut (std::string buffer, std::string file, double2 *data, int length, int step)
 Writes the specified double2 array to a text file. More...
 
void writeOutDouble (std::string buffer, std::string file, double *data, int length, int step)
 Writes the specified double array to a text file. More...
 
void writeOutBool (std::string buffer, std::string file, bool *data, int length, int step)
 Writes the specified double array to a text file. More...
 
void writeOutInt (std::string buffer, std::string file, int *data, int length, int step)
 Writes the specified int array to a text file. More...
 
void writeOutInt2 (std::string buffer, std::string file, int2 *data, int length, int step)
 Writes the specified int2 array to a text file. More...
 
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. More...
 
void writeOutParam (std::string buffer, Grid &par, std::string file)
 Writes the parameter file. More...
 
int readState (std::string name)
 
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. More...
 
void writeOutAdjMat (std::string buffer, std::string file, double *mat, unsigned int *uids, int dim, int step)
 Write adjacency matrix of doubles to a file in Mathematica readable format. More...
 

Detailed Description

Check source file for further information on functions

Function Documentation

◆ readIn()

double2* FileIO::readIn ( std::string  fileR,
std::string  fileI,
int  gSize 
)

Reads in the real and imaginary components from text files.

Parameters
*fileRName of data file of real components
*fileIName of data file of imaginary components
xDimSize of x-grid
yDimSize of y-grid
Returns
*double2 Memory address of read-in data. Complex only

◆ readState()

int FileIO::readState ( std::string  name)

◆ writeOut()

void FileIO::writeOut ( std::string  buffer,
std::string  file,
double2 *  data,
int  length,
int  step 
)

Writes the specified double2 array to a text file.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
*fileName of data file name for saving to
*datadouble2 array to be written out
lengthOverall length of the file to write out
stepIndex for the filename. file_step,filei_step

◆ writeOutAdjMat() [1/2]

void FileIO::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.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
*fileName of data file name for saving to
*matInt Array holding the parameter values to be written out
*uidsUID array
dimDimension/length of the grid (xDim*yDim)
stepIndex for the filename.

◆ writeOutAdjMat() [2/2]

void FileIO::writeOutAdjMat ( std::string  buffer,
std::string  file,
double *  mat,
unsigned int *  uids,
int  dim,
int  step 
)

Write adjacency matrix of doubles to a file in Mathematica readable format.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
*fileName of data file name for saving to
*matdouble Array holding the parameter values to be written out
*uidsUID array
dimDimension/length of the grid (xDim*yDim)
stepIndex for the filename.

◆ writeOutBool()

void FileIO::writeOutBool ( std::string  buffer,
std::string  file,
bool *  data,
int  length,
int  step 
)

Writes the specified double array to a text file.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
*fileName of data file name for saving to
*databool array to be written out
lengthOverall length of the file to write out
stepIndex for the filename. file_step

◆ writeOutDouble()

void FileIO::writeOutDouble ( std::string  buffer,
std::string  file,
double *  data,
int  length,
int  step 
)

Writes the specified double array to a text file.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
*fileName of data file name for saving to
*datadouble array to be written out
lengthOverall length of the file to write out
stepIndex for the filename. file_step

◆ writeOutInt()

void FileIO::writeOutInt ( std::string  buffer,
std::string  file,
int *  data,
int  length,
int  step 
)

Writes the specified int array to a text file.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
*fileName of data file name for saving to
*dataint array to be written out
lengthOverall length of the file to write out
stepIndex for the filename. file_step

◆ writeOutInt2()

void FileIO::writeOutInt2 ( std::string  buffer,
std::string  file,
int2 *  data,
int  length,
int  step 
)

Writes the specified int2 array to a text file.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
*fileName of data file name for saving to
*dataint2 array to be written out
lengthOverall length of the file to write out
stepIndex for the filename. file_step

◆ writeOutParam()

void FileIO::writeOutParam ( std::string  buffer,
Grid par,
std::string  file 
)

Writes the parameter file.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
arrstruct Array holding the parameter values to be written out
*fileName of data file name for saving to

◆ writeOutVortex()

void FileIO::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.

Parameters
*bufferChar buffer for use by function internals. char[100] usually
*fileName of data file name for saving to
*dataVtx::Vortex array to be written out
stepIndex for the filename. file_step