diff options
author | eschnett <eschnett@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2013-01-22 21:00:28 +0000 |
---|---|---|
committer | eschnett <eschnett@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2013-01-22 21:00:28 +0000 |
commit | a4ed7cfd73db6ef8418ffb47f4237cc529f8c710 (patch) | |
tree | bfd603e9eb86fc9ad01ee2b841013903752d1859 /src/SetTime.c | |
parent | 15f9511f821e350bc8c0c850b6f0a65ff786df87 (diff) |
MoL Update
New integrator Euler. This is an explicit, first-order method, mostly
useful for debugging.
New integrators AB (Adams-Bashforth) with various orders. These are
explicit integrators using several past timelevels to provide
higher-order integration with a single RHS evaluation each.
Introduce LinearCombination, a generic routine to calculate linear
combinations of grid functions. This simplifies existing code, and can
be overloaded if MoL should run on a device (e.g. with OpenCL).
Replace cctk_lsh with cctk_ash where necessary.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@190 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
Diffstat (limited to 'src/SetTime.c')
-rw-r--r-- | src/SetTime.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/SetTime.c b/src/SetTime.c index edef89f..b60f3bb 100644 --- a/src/SetTime.c +++ b/src/SetTime.c @@ -234,6 +234,13 @@ void MoL_ResetTime(CCTK_ARGUMENTS) cctkGH->cctk_time = previous_times[MoL_Intermediate_Steps - *MoL_Intermediate_Step]; } + else if (CCTK_EQUALS(ODE_Method,"Euler")) + { + if (*MoL_Intermediate_Step == 1) + { + cctkGH->cctk_time = (*Original_Time); + } + } else if (CCTK_EQUALS(ODE_Method,"RK2")) { if (*MoL_Intermediate_Step == 1) @@ -433,6 +440,13 @@ void MoL_ResetDeltaTime(CCTK_ARGUMENTS) (*MoL_Intermediate_Step)] * (*Original_Delta_Time); } + else if (CCTK_EQUALS(ODE_Method,"Euler")) + { + if (*MoL_Intermediate_Step == 1) + { + cctkGH->cctk_delta_time = (*Original_Delta_Time); + } + } else if (CCTK_EQUALS(ODE_Method,"RK2")) { if (*MoL_Intermediate_Step == 1) |