From 26830dbbaa29e3a8e2d325df273e6fe4a0f1c687 Mon Sep 17 00:00:00 2001 From: allen Date: Wed, 2 Jan 2002 15:32:25 +0000 Subject: Fixing logic error, should still write timestep to a file rather than just to screen, but haven't added that yet. Fixes Cactus/688 git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Time/trunk@41 5633253d-7678-4964-a54d-f87795f8ee59 --- src/Courant.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Courant.c b/src/Courant.c index 7499c41..ea1a6cc 100644 --- a/src/Courant.c +++ b/src/Courant.c @@ -64,19 +64,15 @@ void Time_Courant(CCTK_ARGUMENTS) /* Set the Cactus timestep */ - if (! timestep_outonly) + if (!timestep_outonly) { cctkGH->cctk_delta_time = *courant_dt; - - message = (char *)malloc(1024*sizeof(char)); - sprintf(message,"Time step set to %f",cctkGH->cctk_delta_time); - CCTK_INFO(message); - free(message); - + CCTK_VInfo(CCTK_THORNSTRING,"Time step set to %f",cctkGH->cctk_delta_time); } else { - cctkGH->cctk_delta_time = dtfac*min_spacing; + cctkGH->cctk_delta_time = dtfac*min_spacing; + CCTK_VInfo(CCTK_THORNSTRING,"Courant timestep would be %f",*courant_dt); } -- cgit v1.2.3