| Date: Tue, 22 Mar 2016 14:50:34 -0700
show last output file in status, add debugging output
Diffstat:
M slidergrid/main.c | 23 ++++++++++++++++++++---
M test.c | 8 --------
2 files changed, 20 insertions(+), 11 deletions(-)
--- |
| t@@ -35,9 +35,11 @@ void print_version(char* argv0)
void print_status(simulation sim)
{
- printf("\r%s: t = %.3f s, t_end = %.3f s (%2.0f%%) ",
+ printf("\r%s: t = %.3f s, t_end = %.3f s (%2.0f%%), "
+ "last output = %06d ",
sim.id, sim.time, sim.time_end,
- sim.time/sim.time_end*100.);
+ sim.time/sim.time_end*100.,
+ sim.file_number);
}
int main(int argc, char** argv)
t@@ -70,7 +72,7 @@ int main(int argc, char** argv)
// external function which defines the simulation setup and parameters
simulation sim = setup_simulation();
- if (verbose == 1) {
+ if (verbose) {
sim.verbose = 1;
printf("Sliders N = %d\n", sim.N);
}
t@@ -127,8 +129,23 @@ int main(int argc, char** argv)
sim.time += sim.dt) {
for (i=0; i |
| t@@ -40,13 +40,5 @@ simulation setup_simulation()
sim.time_end = 1.0;
sim.file_interval = 0.1;
- if (write_simulation_output(&sim, ".")) {
- fprintf(stderr, "\nFatal error: Could not write one or more "
- "output files.\n");
- }
-
-
-
-
return sim;
} |