diff --git a/exercise3/wave_1d_parallel.c b/exercise3/wave_1d_parallel.c index ef9847c..e9e4d86 100644 --- a/exercise3/wave_1d_parallel.c +++ b/exercise3/wave_1d_parallel.c @@ -96,7 +96,7 @@ void move_buffer_window(void) { // Derive step t+1 from steps t and t-1. void time_step(void) { // BEGIN: T4 - for (int_t i = 0; i < N; i++) { + for (int_t i = 0; i < n; i++) { U_nxt(i) = -U_prv(i) + 2.0 * U(i) + (dt * dt * c * c) / (dx * dx) * (U(i - 1) + U(i + 1) - 2.0 * U(i)); } // END: T4