aboutsummaryrefslogtreecommitdiff
path: root/src/RK87.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/RK87.c')
-rw-r--r--src/RK87.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/RK87.c b/src/RK87.c
index 90a553b..f847acb 100644
--- a/src/RK87.c
+++ b/src/RK87.c
@@ -150,15 +150,14 @@ void MoL_RK87Add(CCTK_ARGUMENTS)
for (var = 0; var < MoLNumEvolvedVariables; var++)
{
int const step = MoL_Intermediate_Steps - (*MoL_Intermediate_Step);
- int const scratchvarindex =
- scratchspace_firstindex + MoLNumEvolvedVariables * step + var;
+ int const scratchvarindex = scratchspace_firstindex + step;
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, 0.0,
+ scratchvarindex, rl, var, 0.0,
srcs, tls, facts, nsrcs);
}
@@ -178,10 +177,9 @@ void MoL_RK87Add(CCTK_ARGUMENTS)
for (scratchstep = 0; scratchstep < step + 1; scratchstep++)
{
- int const scratchvarindex =
- scratchspace_firstindex + MoLNumEvolvedVariables * scratchstep + var;
+ int const scratchvarindex = scratchspace_firstindex + scratchstep;
srcs [scratchstep+1] = scratchvarindex;
- tls [scratchstep+1] = 0;
+ tls [scratchstep+1] = var;
facts[scratchstep+1] = beta_array[step][scratchstep];
}
@@ -202,10 +200,9 @@ void MoL_RK87Add(CCTK_ARGUMENTS)
for (scratchstep = 0; scratchstep < 13; scratchstep++)
{
- int const scratchvarindex =
- scratchspace_firstindex + MoLNumEvolvedVariables * scratchstep + var;
+ int const scratchvarindex = scratchspace_firstindex + scratchstep;
srcs [scratchstep+1] = scratchvarindex;
- tls [scratchstep+1] = 0;
+ tls [scratchstep+1] = var;
facts[scratchstep+1] = gamma_array[scratchstep];
}
@@ -222,16 +219,15 @@ void MoL_RK87Add(CCTK_ARGUMENTS)
for (scratchstep = 0; scratchstep < 13; scratchstep++)
{
- int const scratchvarindex =
- scratchspace_firstindex + MoLNumEvolvedVariables * scratchstep + var;
+ int const scratchvarindex = scratchspace_firstindex + scratchstep;
srcs [scratchstep] = scratchvarindex;
- tls [scratchstep] = 0;
+ tls [scratchstep] = var;
facts[scratchstep] =
gamma_array[scratchstep] - gammastar_array[scratchstep];
}
MoL_LinearCombination(cctkGH,
- error_firstindex + var, rl, tl, 0.0,
+ error_firstindex, rl, var, 0.0,
srcs, tls, facts, nsrcs);
}