From b985707d2c512426e26b9d73b04f6b3b94348e96 Mon Sep 17 00:00:00 2001 From: Max Luebke Date: Fri, 11 Feb 2022 14:08:40 +0100 Subject: [PATCH] Update output of test application --- src/main_2D.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main_2D.cpp b/src/main_2D.cpp index 0893a22..d278425 100644 --- a/src/main_2D.cpp +++ b/src/main_2D.cpp @@ -34,13 +34,18 @@ int main(int argc, char *argv[]) { // loop 100 times // output is currently generated by the method itself - for (int i = 0; i < 1; i++) { + for (int t = 0; t < 1; t++) { diffu.simulate(field, alpha); - cout << "Iteration: " << i << "\n\n"; + cout << "Iteration: " << t << "\n\n"; - for (int j = 0; j < field.size(); j++) { - cout << field[j] << "\n"; + // iterate through rows + for (int i = 0; i < m; i++) { + // iterate through columns + for (int j = 0; j < n; j++) { + cout << left << std::setw(20) << field[i*n + j]; + } + cout << "\n"; } cout << "\n" << endl;