Read and write functions are provided by the class IO_matrix_file. It is possible to read or write data at every iteration of the simulation using an instance of this class.
IO_matrix_file object constructor.
None
This member function appends data to a file (specified by the constructor, and opened by write() when first called). data_title is used to write a header description at the beginning of the file. If it is not specified, a default description datai,i = 1,2,,n will be added. The header contains the number of iterations, the number of vectors and the data parameters, as follows:
nb_iterations 1269
nb_vector 2
nb_rows 1 nb_cols 1 time (s)
nb_rows 6 nb_cols 1 q(i) (rad)
———————————
A short integer return the status:
These member functions read data from a file (specified by the constructor, and opened when first called). read() reads the values corresponding to only one iteration, while read_all() reads the entire file at once.
These member functions are meant to read a file that was written using write().
Status, as a short int.