Journal Namespace Reference
|
Developer Documentation
|
Functions | |
| void | print_decoration_line (const ConditionalOStream &pcout) |
| void | print_line (const ConditionalOStream &pcout, const std::string &text="", const std::string &operation_name="", const unsigned int extra_size=0) |
| void | print_line_with_decoration (const ConditionalOStream &pcout, const std::string &text="", const std::string &operation_name="", const unsigned int extra_size=0) |
| void | print_table (const ConditionalOStream &pcout, const std::string &title, const dealii::TableHandler &table) |
| Print a multi-line preconfigured table inside a single bordered box with a title row. | |
| void | print_header (const ConditionalOStream &pcout, const std::string &header) |
| Prints a formatted header consisting of a centered text surrounded by decorative lines above and below. | |
| void | print_end (const ConditionalOStream &pcout) |
| void | print_start (const ConditionalOStream &pcout) |
| template<typename number > | |
| void | print_formatted_norm (const ConditionalOStream &pcout, const number norm_value, const std::string &norm_id, const std::string &operation_name, const unsigned int precision=6, const std::string &norm_suffix="L2", const unsigned int extra_size=0) |
| template<typename number > | |
| void | print_formatted_norm (const ConditionalOStream &pcout, const std::function< number()> &compute_norm, const std::string &norm_id, const std::string &operation_name, const unsigned int precision=6, const std::string &norm_suffix="L2", const unsigned int extra_size=0) |
| template void | print_formatted_norm< double > (const ConditionalOStream &pcout, const double norm_value, const std::string &norm_id, const std::string &operation_name, const unsigned int precision, const std::string &norm_suffix, const unsigned int extra_size) |
| template void | print_formatted_norm< double > (const ConditionalOStream &pcout, const std::function< double()> &, const std::string &norm_id, const std::string &operation_name, const unsigned int precision, const std::string &norm_suffix, const unsigned int extra_size) |
Variables | |
| static constexpr int | max_text_width = 100 |
| static const std::string | start_line_symbol = "| " |
| static const std::string | end_line_symbol = " |" |
Function Documentation
◆ print_decoration_line()
|
inline |
Print a decoration line (+—+) with length limited to the maximum allowed text width (max_text_width) to pcout.
- Parameters
-
[in] pcout ConditionalOStream to print the text
◆ print_end()
|
inline |
Shorthand to print end of the simulation.
- Parameters
-
[in] pcout ConditionalOStream to print the text.
◆ print_formatted_norm() [1/2]
| void MeltPoolDG::Journal::print_formatted_norm | ( | const ConditionalOStream & | pcout, |
| const number | norm_value, | ||
| const std::string & | norm_id, | ||
| const std::string & | operation_name, | ||
| const unsigned int | precision = 6, |
||
| const std::string & | norm_suffix = "L2", |
||
| const unsigned int | extra_size = 0 |
||
| ) |
Print a formatted output of a norm, given by a numerical value.
- Parameters
-
[in] pcout ConditionalOStream to print the text. [in] norm_value Numerical value of the norm. [in] norm_id Name of the norm, put into ||norm_id||. [in] operation_name Identifier (right aligned) of the text. [in,opt] precision Precision of the numerical value. [in,opt] norm_suffix Suffix of the norm, put after ||norm_id||. [in,opt] extra_size Shift to avoid ugly output for special characters.
◆ print_formatted_norm() [2/2]
| void MeltPoolDG::Journal::print_formatted_norm | ( | const ConditionalOStream & | pcout, |
| const std::function< number()> & | compute_norm, | ||
| const std::string & | norm_id, | ||
| const std::string & | operation_name, | ||
| const unsigned int | precision = 6, |
||
| const std::string & | norm_suffix = "L2", |
||
| const unsigned int | extra_size = 0 |
||
| ) |
Print a formatted output of a norm, given by a lambda function which will be executed to compute a norm. The function is only called if pcout is configured to produce output.
- Parameters
-
[in] pcout ConditionalOStream to print the text. [in] compute_norm Given function for norm computation. [in] norm_id Name of the norm, put into ||norm_id||. [in] operation_name Identifier (right aligned) of the text. [in,opt] precision Precision of the numerical value. [in,opt] norm_suffix Suffix of the norm, put after ||norm_id||. [in,opt] extra_size Shift to avoid ugly output for special characters.
◆ print_formatted_norm< double >() [1/2]
| template void MeltPoolDG::Journal::print_formatted_norm< double > | ( | const ConditionalOStream & | pcout, |
| const double | norm_value, | ||
| const std::string & | norm_id, | ||
| const std::string & | operation_name, | ||
| const unsigned int | precision, | ||
| const std::string & | norm_suffix, | ||
| const unsigned int | extra_size | ||
| ) |
◆ print_formatted_norm< double >() [2/2]
| template void MeltPoolDG::Journal::print_formatted_norm< double > | ( | const ConditionalOStream & | pcout, |
| const std::function< double()> & | , | ||
| const std::string & | norm_id, | ||
| const std::string & | operation_name, | ||
| const unsigned int | precision, | ||
| const std::string & | norm_suffix, | ||
| const unsigned int | extra_size | ||
| ) |
◆ print_header()
|
inline |
Prints a formatted header consisting of a centered text surrounded by decorative lines above and below.
- Parameters
-
[in] pcout Conditional output stream used for printing. [in] header Text of the header to be printed.
◆ print_line()
| void MeltPoolDG::Journal::print_line | ( | const ConditionalOStream & | pcout, |
| const std::string & | text = "", |
||
| const std::string & | operation_name = "", |
||
| const unsigned int | extra_size = 0 |
||
| ) |
Print a decorated line (starts and ends with "|") to pcout limited to the maximum allowed text width (max_text_width) Optionally, this line may contain a text and an identifier (operation_name). For special characters, which in some cases do not count to the text width and therefore produce ugly output, the end symbol of the decorated line may be shifted via extra_size.
- Parameters
-
[in] pcout ConditionalOStream to print the text. [in,opt] text Text to be printed. [in,opt] operation_name Identifier (right aligned) of the text. [in,opt] extra_size Shift to avoid ugly output for special characters.
◆ print_line_with_decoration()
| void MeltPoolDG::Journal::print_line_with_decoration | ( | const ConditionalOStream & | pcout, |
| const std::string & | text = "", |
||
| const std::string & | operation_name = "", |
||
| const unsigned int | extra_size = 0 |
||
| ) |
As above but in addition prints a decoration line before and after the text.
◆ print_start()
|
inline |
Shorthand to print start of the simulation.
- Parameters
-
[in] pcout ConditionalOStream to print the text.
◆ print_table()
| void MeltPoolDG::Journal::print_table | ( | const ConditionalOStream & | pcout, |
| const std::string & | title, | ||
| const dealii::TableHandler & | table | ||
| ) |
Print a multi-line preconfigured table inside a single bordered box with a title row.
The box width grows to fit the widest table row, but never shrinks below max_text_width, so short tables still line up with the rest of the decorated output.
The function requires a preconfigured dealii::TableHandler object, which is printed inside the box. From the table handler object the labels as well as the corresponding values are extracted. The title is printed in the top row, left-aligned, and the table is printed below it. An example output is shown below:
* +-----------------------------------------------------------------------+ * | Cell statistics | * | | * | label | no. calls | n_cells avg | n_cells min | n_cells max | * +-----------------+-----------+-------------+-------------+-------------+ * | flow_field | 747 | 73.74 | 26 | 112 | * | level_set | 380 | 37.47 | 21 | 42 | * +-----------------+-----------+-------------+-------------+-------------+ *
- Note
- The function does not provide a separate interface for labels of row. If desired, the labels can be added to the table handler object before calling this function.
- Parameters
-
pcout ConditionalOStream to print the text. title Title of the table, printed left-aligned in the top row. table The configured table which is printed inside the box.
Variable Documentation
◆ end_line_symbol
|
static |
◆ max_text_width
|
staticconstexpr |
◆ start_line_symbol
|
static |
Generated by