diff options
author | rhaas <rhaas@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2014-05-01 20:21:27 +0000 |
---|---|---|
committer | rhaas <rhaas@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2014-05-01 20:21:27 +0000 |
commit | 584e037b709c7cf2c09f6634cceb3bc8c1a8f3ad (patch) | |
tree | e8a5a67c7315e61563f8cfd0d45e823f0c77e0b8 | |
parent | 0b7643fc76b98910f03328c4128705e0daf67568 (diff) |
fix InitialCopy for slow sector
before this there was no copy and all slow evolution would have use incorrect
(1 or 2 timesteps out of sync) data in the current timelevel grid functions
which are used to compute the RHS.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@222 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
-rw-r--r-- | src/InitialCopy.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/InitialCopy.c b/src/InitialCopy.c index c4cfbf4..650f248 100644 --- a/src/InitialCopy.c +++ b/src/InitialCopy.c @@ -144,6 +144,37 @@ void MoL_InitialCopy(CCTK_ARGUMENTS) MoL_LinearCombination(cctkGH, EvolvedVariableIndex[var], rl, tl, 0.0, srcs, tls, facts, nsrc); } + + for (var = 0; var < MoLNumEvolvedVariablesSlow; var++) + { + const int nsrc = 1; + const int srcs[1] = {EvolvedVariableIndexSlow[var]}; + const int tls[1] = {1}; + const CCTK_REAL facts[1] = {1.0}; + + StorageOn = CCTK_QueryGroupStorageI(cctkGH, + CCTK_GroupIndexFromVarI(EvolvedVariableIndexSlow[var])); + + if (StorageOn < 0) + { + CCTK_VWarn(1,__LINE__,__FILE__,CCTK_THORNSTRING,"Warning for index %i", + EvolvedVariableIndexSlow[var]); + CCTK_WARN(0, "The index passed does not correspond to a GF."); + } + else if (StorageOn == 0) { +#ifdef MOLDEBUG + printf("Aargh! Vars %d var %d index %d name %s\n", + MoLNumEvolvedVariablesSlow, var, EvolvedVariableIndexSlow[var], + CCTK_VarName(EvolvedVariableIndexSlow[var])); +#endif + CCTK_VWarn(1,__LINE__,__FILE__,CCTK_THORNSTRING,"Warning for GF %s", + CCTK_VarName(EvolvedVariableIndexSlow[var])); + CCTK_WARN(0, "The grid function does not have storage assigned."); + } + + MoL_LinearCombination(cctkGH, EvolvedVariableIndexSlow[var], rl, tl, 0.0, + srcs, tls, facts, nsrc); + } /* Set up the array sizes */ |