diff --git a/README.md b/README.md index ba664a9..8e866ae 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,9 @@ The available commands are * `enstrophy`: to compute the enstrophy and various other observables. This command prints - ```step_index time average(alpha) average(alpha*enstrophy) average(enstrophy) alpha alpha*enstrophy enstrophy``` - where the averages are running averages over `print_freq` steps. + ```step_index time average(alpha) average(enstrophy) average(alpha*enstrophy) alpha enstrophy alpha*enstrophy``` + where the averages are running averages over `print_freq`. In addition, if + the algorithm has an adaptive step, an extra column is printed with `delta`. * `uk`: to compute the Fourier transform of the solution. diff --git a/src/navier-stokes.c b/src/navier-stokes.c index 12a2944..705a302 100644 --- a/src/navier-stokes.c +++ b/src/navier-stokes.c @@ -209,12 +209,13 @@ int enstrophy( // print to stderr so user can follow along if(algorithm==ALGORITHM_RKF45){ - fprintf(stderr,"% .8e % .8e % .8e % .8e % .8e % .8e % .8e % .8e\n",time, avg_a, avg_en_x_a, avg_en, alpha, alpha*enstrophy, enstrophy, delta); + fprintf(stderr,"% .8e % .8e % .8e % .8e % .8e % .8e % .8e % .8e\n",time, avg_a, avg_en, avg_en_x_a, alpha, enstrophy, alpha*enstrophy, delta); + printf("% .15e % .15e % .15e % .15e % .15e % .15e % .15e % .15e\n",time, avg_a, avg_en_x_a, avg_en, alpha, alpha*enstrophy, enstrophy, delta); } else { - fprintf(stderr,"% .8e % .8e % .8e % .8e % .8e % .8e % .8e\n",time, avg_a, avg_en_x_a, avg_en, alpha, alpha*enstrophy, enstrophy); + fprintf(stderr,"% .8e % .8e % .8e % .8e % .8e % .8e % .8e\n",time, avg_a, avg_en, avg_en_x_a, alpha, enstrophy, alpha*enstrophy); + printf("% .15e % .15e % .15e % .15e % .15e % .15e % .15e\n",time, avg_a, avg_en_x_a, avg_en, alpha, alpha*enstrophy, enstrophy); } // print to stdout - printf("% .15e % .15e % .15e % .15e % .15e % .15e % .15e\n",time, avg_a, avg_en_x_a, avg_en, alpha, alpha*enstrophy, enstrophy); } // reset averages