AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Public Member Functions
Aqua::InputOutput::FastASCII Class Reference

Plain text particles data files loader/saver. More...

#include <InputOutput/FastASCII.h>

Inheritance diagram for Aqua::InputOutput::FastASCII:
Inheritance graph
[legend]
Collaboration diagram for Aqua::InputOutput::FastASCII:
Collaboration graph
[legend]

Public Member Functions

 FastASCII (ProblemSetup &sim_data, unsigned int iset, unsigned int offset, unsigned int n=0)
 Constructor.
 
 ~FastASCII ()
 Destructor.
 
- Public Member Functions inherited from Aqua::InputOutput::ASCII
 ASCII (ProblemSetup &sim_data, unsigned int iset, unsigned int offset, unsigned int n=0)
 Constructor.
 
virtual ~ASCII ()
 Destructor.
 
void save (float t)
 Save the data.
 
void load ()
 Load the data.
 
- Public Member Functions inherited from Aqua::InputOutput::Particles
 Particles (ProblemSetup &sim_data, unsigned int iset, unsigned int offset, unsigned int n=0)
 Constructor.
 
virtual ~Particles ()
 Destructor.
 
const std::string file ()
 Get the last printed file path.
 
unsigned int n ()
 Get the number of particles managed by this instance.
 
virtual void waitForSavers ()
 Wait for the eventual parallel saving threads.
 
virtual void save (float t)=0
 Save the data.
 
virtual void load ()=0
 Load the data.
 

Additional Inherited Members

- Protected Member Functions inherited from Aqua::InputOutput::Particles
ProblemSetupsimData ()
 Get the simulation data structure.
 
void n (unsigned int n)
 Set the number of particles managed by this instance.
 
const uivec2 bounds () const
 Get the particle index bounds of the "set of particles" managed by this class.
 
const 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)
 
std::vector< void * > download (std::vector< std::string > fields)
 
- Protected Member Functions inherited from Aqua::InputOutput::InputOutput
 InputOutput ()
 Constructor.
 
virtual ~InputOutput ()
 Destructor.
 

Detailed Description

Plain text 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.

Note
Comments are allowed using the symbol "#", such that all the text after this symbol, and in the same line, will be discarded. The fields can be separated by the following symbols:
  • " "
  • ","
  • ";"
  • "("
  • ")"
  • "["
  • "]"
  • "{"
  • "}"
  • tabulator
Remarks
In the case of integer numbers (signed or unsigned) this class does not care about decimal points, just truncating the value, i.e. 1.5 will be interpreted as 1, and -1.5 will be interpreted as -1.
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.

Constructor & Destructor Documentation

◆ FastASCII()

Aqua::InputOutput::FastASCII::FastASCII ( ProblemSetup sim_data,
unsigned int  iset,
unsigned int  offset,
unsigned int  n = 0 
)

Constructor.

Parameters
sim_dataSimulation data
isetParticles set index.
offsetFirst particle managed by this saver/loader.
nNumber of particles managed by this saver/loader. If 0, the number of particles will be obtained from the input file (thus only valid for loaders)

◆ ~FastASCII()

Aqua::InputOutput::FastASCII::~FastASCII ( )

Destructor.


The documentation for this class was generated from the following files: