hummingbird
Solving the self-adjoint angular flux transport equation using spectral elements on Cartesian geometry
Loading...
Searching...
No Matches
output.cc
Go to the documentation of this file.
1#include "utils/output.h"
2
3#include "utils/enums.h"
4
5namespace hummingbird {
7 fmt::print(
8 "\n"
9 " _ _ _ _ _ \n"
10 "| |__ _ _ _ __ ___ _ __ ___ (_)_ __ __ _| |__ (_)_ __ __| |\n"
11 "| '_ \\| | | | '_ ` _ \\| '_ ` _ \\| | '_ \\ / _` | '_ \\| | '__/ _` |\n"
12 "| | | | |_| | | | | | | | | | | | | | | | (_| | |_) | | | | (_| |\n"
13 "|_| |_|\\__,_|_| |_| |_|_| |_| |_|_|_| |_|\\__, |_.__/|_|_| \\__,_|\n"
14 " |___ / \n "
15 "\n");
16
17 fmt::print(
18 " Description | Spectral Elements for Radiation Transport \n"
19 " Copyright | 2026, Liam Pohlmann\n"
20 " License | "
21 "https://github.com/lipohlmann/hummingbird/blob/main/LICENSE\n\n");
22}
24 fmt::print(
25 " k-eff Iter. k-eff k-eff Error | Scatter Iter. "
26 "Flux Error Relative Err.\n"
27 " ============= ============= ============= | ============= "
28 "============= =============\n");
29}
30void print_input_files(const std::string input, const std::string mesh) {
31 fmt::print(" Input file | {}\n", input);
32 fmt::print(" Mesh file | {}\n\n", mesh);
33}
34
35void print_k_status(const double k_eff, const double error,
36 const unsigned int iter) {
37 if (iter > 1)
38 fmt::print(" {:^13} {:^13.5e} {:^13.5e} |\n", iter, k_eff, error);
39 else
40 fmt::print(" {:^13} {:^13.5f} {:^13} |\n", iter, k_eff, "-");
41}
42
43void print_scatter_status(const double flux_l2_error,
44 const double relative_error,
45 const unsigned int iter) {
46 if (iter > 1)
47 fmt::print(
48 " | {:^13} "
49 "{:^13.5e} {:^13.5e}\n",
50 iter, flux_l2_error, relative_error);
51 else
52 fmt::print(
53 " | {:^13} "
54 "{:^13.5e} {:^13}\n",
55 iter, flux_l2_error, "-");
56}
57
58void print_scatter_complete(const double final_k_eff, const RunMode run_mode) {
59 fmt::print(
60 " "
61 "------------------------------------------------------------------------"
62 "-----------------"
63 "\n\n");
64 fmt::print("Source iterations complete.\n\n");
65}
66void print_mesh_info(const size_t n_nodes, const size_t n_elements,
67 const unsigned int dimension) {
68 fmt::print(
69 "Mesh info:\n"
70 " Number of nodes: {}\n"
71 " Number of elements: {}\n"
72 " Dimension: {}\n\n",
73 n_nodes, n_elements, dimension);
74}
75
76} // namespace hummingbird
RunMode
Run modes available.
Definition enums.h:90
void print_input_files(const std::string input, const std::string mesh)
Print the paths of the input and mesh files being used.
Definition output.cc:30
void print_scatter_status(const double flux_l2_error, const double relative_error, const unsigned int iter)
Print the scalar flux convergence status for the current source iteration.
Definition output.cc:43
void print_scatter_complete(const double final_k_eff, const RunMode sim_typ)
Print a message indicating source iterations have completed.
Definition output.cc:58
void print_k_status(const double k_eff, const double error, const unsigned int iter)
Print the k-eff status for the current iteration.
Definition output.cc:35
void print_header()
Print the program banner, description, and license information.
Definition output.cc:6
void print_mesh_info(const size_t n_nodes, const size_t n_elements, const unsigned int dimension)
Print information about the mesh.
Definition output.cc:66
void print_columns()
Print the column headers for the k-eff/scatter iteration status table.
Definition output.cc:23