diff options
author | hawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2004-07-01 11:02:39 +0000 |
---|---|---|
committer | hawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2004-07-01 11:02:39 +0000 |
commit | 2c8448f84da0b9f4ae13cf1a02c71e0c626e4782 (patch) | |
tree | acdb6e851521a70ce86232c157fcde018a332c73 /src/SetTime.c | |
parent | 6c919642546550497f17559a7d4f19a01b8d39ef (diff) |
Add the Classic RK3 method (as a generic method, so use Generic_Type).
Agrees with other RK3's to floating point round off (except at
boundaries) for linear case. Uses more storage and is slower than
standard RK3 so I don't recommend it.
This showed up (so I fixed) a bug with the generic methods when used
with Carpet.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@72 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
Diffstat (limited to 'src/SetTime.c')
-rw-r--r-- | src/SetTime.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/SetTime.c b/src/SetTime.c index 76a06a4..94380b1 100644 --- a/src/SetTime.c +++ b/src/SetTime.c @@ -19,6 +19,8 @@ static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusBase_MoL_SetTime_c); +/* #define MOLDEBUG 1 */ + /******************************************************************** ********************* Local Data Types *********************** ********************************************************************/ @@ -192,7 +194,7 @@ int MoL_ResetTime(CCTK_ARGUMENTS) } else if (*MoL_Intermediate_Step == 1) { - cctkGH->cctk_time = (*Original_Time) + + cctkGH->cctk_time = (*Original_Time) - 0.5*(*Original_Delta_Time)/cctkGH->cctk_timefac; } } @@ -254,7 +256,7 @@ int MoL_ResetDeltaTime(CCTK_ARGUMENTS) { cctkGH->cctk_delta_time = RKBetaCoefficients[MoL_Intermediate_Steps - (*MoL_Intermediate_Step)] * - (*Original_Delta_Time)/cctkGH->cctk_timefac; + (*Original_Delta_Time); } else if (CCTK_EQUALS(ODE_Method,"RK2")) { |