tk::DiagWriter class

DiagWriter : tk::Writer.

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

void header(const std::vector<std::string>& name) const
Write out diagnostics file header.
auto write(uint64_t it, tk::real t, tk::real dt, const std::vector<tk::real>& diagnostics) -> std::size_t
Write diagnostics file.

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
in Time
dt in Time step size
diagnostics in Vector with the diagnostics
Returns The total number of diagnostics written to the output file