OpenLB 1.7
|
#include <CSVWriter.h>
Public Member Functions | |
CSV (std::string name, char separator, std::vector< std::string > columnTags) | |
Constructor with name for output file. | |
CSV (std::string name="unnamed") | |
CSV (std::string name, char separator) | |
CSV (std::string name, std::vector< std::string > columnTags) | |
void | writeDataFile (T xValue, T yValue, const std::string &plotFileName, int precision=16) |
former datFileOut functions these functions create a datafile in the csv format in order to write in a separated datafile as the one named in the constructor, just put the name as the plotFileName parameter | |
void | writeDataFile (T xValue, const std::vector< T > &yValues, const std::string &plotFileName, int precision=16) |
writes the data file for one double and a vector of doubles with a specific filename | |
void | writeDataFile (T xValue, T yValue, int precision=16) |
writes the data file for two doubles (x and y) | |
void | writeDataFile (T xValue, const std::vector< T > &yValues, int precision=16) |
writes the data file for one double and a vector of doubles (x and y1,y2,...) | |
void | setColumnTags (const std::vector< std::string > columnTags, std::string &plotFileName) |
adds column tags at the beginning of the csv data file. | |
void | setColumnTags (const std::vector< std::string > columnTags) |
void | clearFile (std::string filename) |
clears the file | |
void | clearFile () |
Definition at line 34 of file CSVWriter.h.
olb::CSV< T >::CSV | ( | std::string | name, |
char | separator, | ||
std::vector< std::string > | columnTags ) |
Constructor with name for output file.
Constructor with name of outputFiles boolean true for real-time plotting //WARNING: experimental!
add (new) data file
Definition at line 39 of file CSVWriter.hh.
|
explicit |
Definition at line 63 of file CSVWriter.hh.
olb::CSV< T >::CSV | ( | std::string | name, |
char | separator ) |
Definition at line 66 of file CSVWriter.hh.
olb::CSV< T >::CSV | ( | std::string | name, |
std::vector< std::string > | columnTags ) |
Definition at line 60 of file CSVWriter.hh.
void olb::CSV< T >::clearFile | ( | ) |
Definition at line 153 of file CSVWriter.hh.
void olb::CSV< T >::clearFile | ( | std::string | filename | ) |
clears the file
empty the file by opening an ofstream
Definition at line 145 of file CSVWriter.hh.
References olb::singleton::directories().
void olb::CSV< T >::setColumnTags | ( | const std::vector< std::string > | columnTags | ) |
Definition at line 139 of file CSVWriter.hh.
void olb::CSV< T >::setColumnTags | ( | const std::vector< std::string > | columnTags, |
std::string & | plotFileName ) |
adds column tags at the beginning of the csv data file.
saves the content of the file and rewrites it with the tags at the top and then inserting the content again
to prevent having a separator at the end
Definition at line 119 of file CSVWriter.hh.
References olb::singleton::directories().
void olb::CSV< T >::writeDataFile | ( | T | xValue, |
const std::vector< T > & | yValues, | ||
const std::string & | plotFileName, | ||
int | precision = 16 ) |
writes the data file for one double and a vector of doubles with a specific filename
Definition at line 70 of file CSVWriter.hh.
References olb::singleton::directories(), olb::singleton::Directories::getGnuplotOutDir(), and olb::singleton::mpi().
void olb::CSV< T >::writeDataFile | ( | T | xValue, |
const std::vector< T > & | yValues, | ||
int | precision = 16 ) |
writes the data file for one double and a vector of doubles (x and y1,y2,...)
Definition at line 101 of file CSVWriter.hh.
void olb::CSV< T >::writeDataFile | ( | T | xValue, |
T | yValue, | ||
const std::string & | plotFileName, | ||
int | precision = 16 ) |
former datFileOut functions these functions create a datafile in the csv format in order to write in a separated datafile as the one named in the constructor, just put the name as the plotFileName parameter
writes the data file for two doubles with a specific filename
Definition at line 91 of file CSVWriter.hh.
void olb::CSV< T >::writeDataFile | ( | T | xValue, |
T | yValue, | ||
int | precision = 16 ) |
writes the data file for two doubles (x and y)
Definition at line 109 of file CSVWriter.hh.