Skip to content

Commit ce61090

Browse files
authored
Reduce verbose output for iterations (#79)
1 parent 1338819 commit ce61090

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ has been successfully tested for some configurations.
8989

9090
We use `Likwid` for performance monitoring. You can install it using Spack as well:
9191

92-
**Install Likwid (Performance Monitoring Tool)**:
93-
```bash
94-
spack install likwid
95-
```
92+
**Install Likwid (Performance Monitoring Tool)**:
93+
```bash
94+
spack install likwid
95+
```
9696

9797
## Running GMGPolar
9898

src/GMGPolar/solver.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void GMGPolar::solve()
3939
while (number_of_iterations_ < max_iterations_) {
4040

4141
if (verbose_ > 0) {
42-
std::cout << "\nIteration: " << number_of_iterations_ << std::endl;
42+
std::cout << "\nit: " << number_of_iterations_;
4343
}
4444

4545
/* ---------------------------------------------- */
@@ -58,8 +58,8 @@ void GMGPolar::solve()
5858
std::chrono::duration<double>(end_check_exact_error - start_check_exact_error).count();
5959

6060
if (verbose_ > 0) {
61-
std::cout << "Exact Weighted-Euclidean Error: " << exact_error.first << std::endl;
62-
std::cout << "Exact Infinity Error: " << exact_error.second << std::endl;
61+
std::cout << ", ||u_k-u_ex||_l2: " << exact_error.first;
62+
std::cout << ", ||u_k-u_ex||_inf: " << exact_error.second;
6363
}
6464
}
6565
LIKWID_START("Solver");
@@ -98,7 +98,7 @@ void GMGPolar::solve()
9898
initial_residual_norm = current_residual_norm;
9999
current_relative_residual_norm = 1.0;
100100
if (verbose_ > 0) {
101-
std::cout << "Residual Norm: " << current_residual_norm << std::endl;
101+
std::cout << ", ||r_k||: " << current_residual_norm;
102102
}
103103
}
104104
else {
@@ -107,9 +107,9 @@ void GMGPolar::solve()
107107
residual_norms_[number_of_iterations_] / residual_norms_[number_of_iterations_ - 1];
108108

109109
if (verbose_ > 0) {
110-
std::cout << "Residual Norm: " << current_residual_norm << std::endl;
111-
std::cout << "Relative Residual Norm: " << current_relative_residual_norm << std::endl;
112-
std::cout << "Residual Reduction Factor: " << current_residual_reduction_factor << std::endl;
110+
std::cout << ", ||r_k||: " << current_residual_norm;
111+
std::cout << ", ||r_k|| / ||r_0||: " << current_relative_residual_norm;
112+
std::cout << ", ||r_k|| / ||r_{k-1}||: " << current_residual_reduction_factor;
113113
}
114114

115115
const double convergence_factor = 0.7;

0 commit comments

Comments
 (0)