Contains function that write simulation data to a file. More...
#include <iostream>#include <fstream>#include <string>#include <cmath>#include "hdsim2d.hpp"#include "../../misc/utils.hpp"#include "../../tessellation/ConvexHull.hpp"#include "physical_geometry.hpp"

Go to the source code of this file.
Functions | |
| void | BinOutput (string location, hdsim const &sim, Tessellation const &V, bool floatprecision=true) |
| Outputs the simulation data into a binary file (float precision) as follows: 1) Int - Number of cells=n 2) For each cell it's x and y coordinate (2 floats)*n 3) Pressure (n floats) 4) Density (n floats) 5) For each cell an int=N, stating the number of vertices and then the vertices(2*N floats) 6) The time - float 7) The number of cells with tracers - int 8) The number of tracers - int 9) The passive tracers written cell by cell (float) More... | |
| Extensive | total_conserved (hdsim const &sim) |
| Calculates the total extensive conserved variables of the entire computational domain. More... | |
| double | total_tracer (const hdsim &sim, const int index) |
| Calculates the total amount of tracer in computational domain. More... | |
| void | DisplayError (UniversalError const &eo) |
| Displays the UniversalError information. More... | |
| void | write_error (const string &fname, const UniversalError &eo) |
| Writes all the error information to a file. More... | |
| void | WriteVector2DToFile (vector< Vector2D > const &vec, string filename) |
| Writes a vector of Vector2D to a binary file. More... | |
| vector< Vector2D > | ReadVector2DFromFile (string filename) |
| Reads a vector of Vector2D from a binary file. More... | |
Contains function that write simulation data to a file.
Definition in file diagnostics.hpp.
| void BinOutput | ( | string | location, |
| hdsim const & | sim, | ||
| Tessellation const & | V, | ||
| bool | floatprecision = true |
||
| ) |
Outputs the simulation data into a binary file (float precision) as follows: 1) Int - Number of cells=n 2) For each cell it's x and y coordinate (2 floats)*n 3) Pressure (n floats) 4) Density (n floats) 5) For each cell an int=N, stating the number of vertices and then the vertices(2*N floats) 6) The time - float 7) The number of cells with tracers - int 8) The number of tracers - int 9) The passive tracers written cell by cell (float)
| location | The output file's location |
| sim | The hydro sim |
| V | The tessellation |
| floatprecision | A flag to choose output in float/double precision |
| void DisplayError | ( | UniversalError const & | eo | ) |
Displays the UniversalError information.
| eo | Th UniversalError |
Definition at line 9 of file diagnostics.cpp.


| vector<Vector2D> ReadVector2DFromFile | ( | string | filename | ) |
Reads a vector of Vector2D from a binary file.
| filename | The path to the output file |
Definition at line 58 of file diagnostics.cpp.
Calculates the total extensive conserved variables of the entire computational domain.
| sim | Hydrodynamic simulation |
Definition at line 52 of file diagnostics.cpp.

| double total_tracer | ( | const hdsim & | sim, |
| const int | index | ||
| ) |
Calculates the total amount of tracer in computational domain.
| sim | Hydrodynamic simulation |
| index | Index of tracer |
| void write_error | ( | const string & | fname, |
| const UniversalError & | eo | ||
| ) |
Writes all the error information to a file.
| fname | File name |
| eo | Error object |
Definition at line 17 of file diagnostics.cpp.

| void WriteVector2DToFile | ( | vector< Vector2D > const & | vec, |
| string | filename | ||
| ) |
Writes a vector of Vector2D to a binary file.
| vec | The vector to write |
| filename | The path to the output file |
Definition at line 77 of file diagnostics.cpp.
1.8.13