|
Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website |
Typedefs | |
| using | Items = std::vector< std::pair< std::string, std::string > > |
| Key-value lines of a setup section, in display order. | |
Enumerations | |
| enum class | Style { BOLD , DIM , RED , YELLOW , GREEN , CYAN } |
Functions | |
| std::string | format (const char *fmt,...) MALLARD_PRINTF(1 |
| printf-style formatting into a std::string. | |
| bool | color_stdout () |
| Whether to color stdout (stderr): a terminal, NO_COLOR unset and not under an MPI launcher, or CLICOLOR_FORCE set. | |
| bool | color_stderr () |
| std::string | style (std::string_view text, Style s) |
| Wraps text in an ANSI style when stdout gets color, else returns it unchanged. | |
| void | line (std::string_view text="") |
| Prints a line on stdout from rank 0. | |
| void | section (std::string_view title, std::string_view right="") |
| Section heading, e.g. "== Mesh ===...=== 0.12 s". | |
| void | item (std::string_view key, std::string_view value) |
| Aligned " key value" line under a section. | |
| void | items (const Items &list) |
| void | begin_phase (std::string_view name) |
| Starts a line naming a setup phase; end_phase() completes it with the elapsed time. Anything printed in between first ends the open line. | |
| void | end_phase (double seconds) |
| void | event (uint64_t step, double t, std::string_view kind, std::string_view text) |
| One-line event during the run (e.g. a file written), led by the step and time so it lines up with the progress table. | |
| void | warning (std::string_view message) |
| Warning on stderr from rank 0, for conditions every rank sees alike. | |
| void | error (std::string_view message) |
| Error on stderr from the calling rank, prefixed with the rank in parallel runs. | |
| std::string | count (uint64_t n) |
| 1234567 -> "1,234,567". | |
| std::string | duration (double seconds) |
| Wall-clock duration: "850 us", "12.3 ms", "4.56 s", "12m 03s", "2h 05m". | |
| std::string | si (double value) |
| Value with an SI suffix and 3 significant digits: "16.3M", "1.20k". | |
| std::string | real (double value) |
| Compact real: "%.6g". | |
Variables | |
| constexpr int | WIDTH = 92 |
| Width of section rules and the target maximum line width. | |
| constexpr int | KEY_WIDTH = 18 |
| Column at which the values of key-value lines start. | |
| using logging::Items = typedef std::vector<std::pair<std::string, std::string> > |
Key-value lines of a setup section, in display order.
|
strong |
| void logging::begin_phase | ( | std::string_view | name | ) |
Starts a line naming a setup phase; end_phase() completes it with the elapsed time. Anything printed in between first ends the open line.
| bool logging::color_stderr | ( | ) |
| bool logging::color_stdout | ( | ) |
Whether to color stdout (stderr): a terminal, NO_COLOR unset and not under an MPI launcher, or CLICOLOR_FORCE set.
| std::string logging::count | ( | uint64_t | n | ) |
1234567 -> "1,234,567".
| std::string logging::duration | ( | double | s | ) |
Wall-clock duration: "850 us", "12.3 ms", "4.56 s", "12m 03s", "2h 05m".
| void logging::error | ( | std::string_view | message | ) |
Error on stderr from the calling rank, prefixed with the rank in parallel runs.
One-line event during the run (e.g. a file written), led by the step and time so it lines up with the progress table.
| void logging::item | ( | std::string_view | key, |
| std::string_view | value | ||
| ) |
Aligned " key value" line under a section.
| void logging::line | ( | std::string_view | text | ) |
Prints a line on stdout from rank 0.
| std::string logging::real | ( | double | v | ) |
Compact real: "%.6g".
| void logging::section | ( | std::string_view | title, |
| std::string_view | right | ||
| ) |
Section heading, e.g. "== Mesh ===...=== 0.12 s".
| std::string logging::si | ( | double | v | ) |
Value with an SI suffix and 3 significant digits: "16.3M", "1.20k".
| std::string std::string logging::style | ( | std::string_view | text, |
| Style | s | ||
| ) |
Wraps text in an ANSI style when stdout gets color, else returns it unchanged.
| void logging::warning | ( | std::string_view | message | ) |
Warning on stderr from rank 0, for conditions every rank sees alike.
Column at which the values of key-value lines start.