|
| CSV (ProblemSetup &sim_data, unsigned int iset, size_t offset, size_t n=0, const std::string file_ext=".csv", const char sep=',') |
| Constructor.
|
| ~CSV () |
| Destructor.
|
void | load () final |
| Load the data.
|
void | print_file () final |
| Print the data to a file.
|
| FastASCII (ProblemSetup &sim_data, unsigned int iset, size_t offset, size_t n=0, const std::string file_ext=".dat") |
| Constructor.
|
| ~FastASCII () |
| Destructor.
|
| ASCII (ProblemSetup &sim_data, unsigned int iset, size_t offset, size_t n=0, const std::string file_ext=".dat") |
| Constructor.
|
virtual | ~ASCII () |
| Destructor.
|
Public Member Functions inherited from Aqua::InputOutput::Particles |
| Particles (ProblemSetup &sim_data, unsigned int iset, size_t offset, size_t n=0) |
| Constructor.
|
virtual | ~Particles () |
| Destructor.
|
const std::string & | file () const |
| Get the last printed file path.
|
size_t | n () const |
| Get the number of particles managed by this instance.
|
cl_event | getUserEvent () const |
| Get the user event to be waited for before the file saving is finished.
|
virtual void | waitForSavers () |
| Wait for the eventual parallel saving threads.
|
virtual void | save (float t) |
| Save the data.
|
|
void | print_header (std::ofstream &f) const final |
| Write the file header.
|
void | formatLine (std::string &l) final |
| Conveniently format a read line.
|
size_t | readNParticles (std::ifstream &f) final |
| Count the number of particles present in the input file.
|
std::string | readField (const std::string field, const std::string line, size_t index, void *data) |
| Extract the field value from a line.
|
void | print_file (const char sep, const char comp_sep) |
| Print the data to a file.
|
Protected Member Functions inherited from Aqua::InputOutput::Particles |
const ProblemSetup & | simData () const |
| Get the simulation data structure.
|
void | n (const size_t &n) |
| Set the number of particles managed by this instance.
|
const ulvec2 | bounds () const |
| Get the particle index bounds of the "set of particles" managed by this class.
|
unsigned int | setId () const |
| Get the "particles set" index associated with this class.
|
void | loadDefault () |
| Register some default arrays:
|
void | file (const std::string filename) |
| Set the file name.
|
unsigned int | file (const std::string basename, unsigned int start_index, unsigned int digits=5) |
float | time () const |
| Get the current simulation time to be written.
|
cl_event | download (std::vector< std::string > fields) |
| Download the data from the device and store it.
|
std::map< std::string, void * > | data () const |
| Get the stored memory objects where the device data has been downloaded.
|
| InputOutput () |
| Constructor.
|
virtual | ~InputOutput () |
| Destructor.
|
CSV particles data files loader/saver.
These files are formatted as ASCCI plain text where the particles data are stored by rows, and where the fields are separated by columns.
- Warning
- Saving the particles data in plain text format may be heavily hard disk demanding, and therefore it is strongly recommended to consider binary formats like Aqua::InputOutput::VTK.