Journal Namespace Reference

Developer Documentation: MeltPoolDG::Journal Namespace Reference
Developer Documentation
MeltPoolDG::Journal Namespace Reference

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_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()

void MeltPoolDG::Journal::print_decoration_line ( const ConditionalOStream pcout)
inline

Print a decoration line (+—+) with length limited to the maximum allowed text width (max_text_width) to pcout.

Parameters
[in]pcoutConditionalOStream to print the text

◆ print_end()

void MeltPoolDG::Journal::print_end ( const ConditionalOStream pcout)
inline

Shorthand to print end of the simulation.

Parameters
[in]pcoutConditionalOStream to print the text.

◆ print_formatted_norm() [1/2]

template<typename number >
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]pcoutConditionalOStream to print the text.
[in]norm_valueNumerical value of the norm.
[in]norm_idName of the norm, put into ||norm_id||.
[in]operation_nameIdentifier (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]

template<typename number >
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]pcoutConditionalOStream to print the text.
[in]compute_normGiven function for norm computation.
[in]norm_idName of the norm, put into ||norm_id||.
[in]operation_nameIdentifier (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()

void MeltPoolDG::Journal::print_header ( const ConditionalOStream pcout,
const std::string &  header 
)
inline

Prints a formatted header consisting of a centered text surrounded by decorative lines above and below.

Parameters
[in]pcoutConditional output stream used for printing.
[in]headerText 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]pcoutConditionalOStream 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()

void MeltPoolDG::Journal::print_start ( const ConditionalOStream pcout)
inline

Shorthand to print start of the simulation.

Parameters
[in]pcoutConditionalOStream to print the text.

Variable Documentation

◆ end_line_symbol

const std::string MeltPoolDG::Journal::end_line_symbol = " |"
static

◆ max_text_width

constexpr int MeltPoolDG::Journal::max_text_width = 100
staticconstexpr

◆ start_line_symbol

const std::string MeltPoolDG::Journal::start_line_symbol = "| "
static