tfixed run time output - ns2dfd - 2D finite difference Navier Stokes solver for… | |
git clone git://src.adamsgaard.dk/ns2dfd | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit 11ed07ed184958fe2c18d696a2ecca8b01695fd2 | |
parent 78528b5cbef9193329d1cff3968e15b747323cf8 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sun, 2 Mar 2014 21:33:34 +0100 | |
fixed run time output | |
Diffstat: | |
M src/main.c | 7 ++++--- | |
1 file changed, 4 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/src/main.c b/src/main.c | |
t@@ -75,9 +75,6 @@ int main(int argc, char** argv) | |
dt = select_time_step(tau, re, dx, dy, nx, ny, U, V); | |
- printf("\rt = %.2f/%.2f s, dt = %.2f s, last output: %d", | |
- t, t_end, dt, nfile); | |
- | |
if (t_file_elapsed >= t_file || n == 0) { | |
sprintf(filename, "%s%05d.dat", simulation_id, nfile); | |
write_file(filename, &t, &t_end, &t_file, &tau, &itermax, | |
t@@ -88,6 +85,10 @@ int main(int argc, char** argv) | |
nfile++; | |
} | |
+ printf("\rt = %f/%.2f s, dt = %f s, last output: %d ", | |
+ t, t_end, dt, nfile-1); | |
+ | |
+ | |
t += dt; | |
n++; | |
t_file_elapsed += dt; |