diff options
Diffstat (limited to 'src/RK87.c')
-rw-r--r-- | src/RK87.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -71,6 +71,7 @@ void MoL_RK87Add(CCTK_ARGUMENTS) CCTK_INT arraydim; static CCTK_INT scratchspace_firstindex = -99; + static CCTK_INT error_firstindex = -99; CCTK_INT var, scratchstep; CCTK_INT totalsize; @@ -131,6 +132,10 @@ void MoL_RK87Add(CCTK_ARGUMENTS) { scratchspace_firstindex = CCTK_FirstVarIndex("MOL::SCRATCHSPACE"); } + if (error_firstindex == -99) + { + error_firstindex = CCTK_FirstVarIndex("MOL::ERRORESTIMATE"); + } /* Real GFs */ @@ -146,20 +151,19 @@ void MoL_RK87Add(CCTK_ARGUMENTS) { int const step = MoL_Intermediate_Steps - (*MoL_Intermediate_Step); int const scratchvarindex = - scratchspace_firstindex + MoL_Num_Evolved_Vars * step + var; + scratchspace_firstindex + MoLNumEvolvedVariables * step + var; int const nsrcs = 1; CCTK_INT const srcs[] = {RHSVariableIndex[var]}; CCTK_INT const tls[] = {0}; CCTK_REAL const facts[] = {(*Original_Delta_Time) / cctkGH->cctk_timefac}; MoL_LinearCombination(cctkGH, - scratchvarindex, rl, tl, 1.0, + scratchvarindex, rl, tl, 0.0, srcs, tls, facts, nsrcs); } for (var = 0; var < MoLNumEvolvedVariables; var++) { - int const error_firstindex = CCTK_FirstVarIndex("MOL::ERRORESTIMATE"); int const step = MoL_Intermediate_Steps - (*MoL_Intermediate_Step); if (*MoL_Intermediate_Step - 1) @@ -175,7 +179,7 @@ void MoL_RK87Add(CCTK_ARGUMENTS) for (scratchstep = 0; scratchstep < step + 1; scratchstep++) { int const scratchvarindex = - scratchspace_firstindex + MoL_Num_Evolved_Vars * scratchstep + var; + scratchspace_firstindex + MoLNumEvolvedVariables * scratchstep + var; srcs [scratchstep+1] = scratchvarindex; tls [scratchstep+1] = 0; facts[scratchstep+1] = beta_array[step][scratchstep]; @@ -199,7 +203,7 @@ void MoL_RK87Add(CCTK_ARGUMENTS) for (scratchstep = 0; scratchstep < 13; scratchstep++) { int const scratchvarindex = - scratchspace_firstindex + MoL_Num_Evolved_Vars * scratchstep + var; + scratchspace_firstindex + MoLNumEvolvedVariables * scratchstep + var; srcs [scratchstep+1] = scratchvarindex; tls [scratchstep+1] = 0; facts[scratchstep+1] = gamma_array[scratchstep]; @@ -219,7 +223,7 @@ void MoL_RK87Add(CCTK_ARGUMENTS) for (scratchstep = 0; scratchstep < 13; scratchstep++) { int const scratchvarindex = - scratchspace_firstindex + MoL_Num_Evolved_Vars * scratchstep + var; + scratchspace_firstindex + MoLNumEvolvedVariables * scratchstep + var; srcs [scratchstep] = scratchvarindex; tls [scratchstep] = 0; facts[scratchstep] = |