DiagWriter class
#include <src/IO/DiagWriter.hpp>
ASCII diagnostics writer class that facilitates outputing diagnostics to text files.
Base classes
- class Writer
Constructors, destructors, conversion operators
- DiagWriter(const std::string& filename, const std::string& format = "default", std::streamsize precision = std::cout.precision(), std::ios_base::openmode mode = std::ios_base::out) explicit
- Constructor.
Public functions
Function documentation
tk:: DiagWriter:: DiagWriter(const std::string& filename,
const std::string& format = "default",
std::streamsize precision = std::cout.precision(),
std::ios_base::openmode mode = std::ios_base::out) explicit
Constructor.
| Parameters | |
|---|---|
| filename in | Output filename to which output the diagnostics |
| format in | Configure floating-point output format ASCII output |
| precision in | Configure precision for floating-point ASCII output |
| mode in | Configure file open mode |
void tk:: DiagWriter:: header(const std::vector<std::string>& name) const
Write out diagnostics file header.
| Parameters | |
|---|---|
| name in | Vector of strings with the names of diagnostics |
std::size_t tk:: DiagWriter:: write(uint64_t it,
tk:: real t,
tk:: real dt,
const std::vector<tk:: real>& diagnostics)
Write diagnostics file.
| Parameters | |
|---|---|
| it in | Iteration counter |
| t in | Time |
| dt in | Time step size |
| diagnostics in | Vector with the diagnostics |
| Returns | The total number of diagnostics written to the output file |