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;