aboutsummaryrefslogtreecommitdiff
path: root/src/SandR.c
diff options
context:
space:
mode:
authorhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-05-21 09:12:14 +0000
committerhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-05-21 09:12:14 +0000
commitf3a2829b5b32b6fad8383ac16c16ac6c2f58b696 (patch)
tree19a58318d2bcb7f95ecf044e5713453d9bff0bea /src/SandR.c
parent7e9dff2f70bd9950b27092e816f9a3cc14ff3582 (diff)
Add support for evolving complex GFs and (real and complex) GAs.
Only works with ICN or RK2 for now - in fact this commit may break the generic RK methods temporarily. Note the documentation isn't quite right - there's no longer a seperate function for each different type... git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@12 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
Diffstat (limited to 'src/SandR.c')
-rw-r--r--src/SandR.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/SandR.c b/src/SandR.c
index ea419ff..586b31f 100644
--- a/src/SandR.c
+++ b/src/SandR.c
@@ -8,6 +8,8 @@
@version $Header$
@@*/
+#include <string.h>
+
#include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
@@ -72,10 +74,11 @@ void MoL_RestoreSandR(CCTK_ARGUMENTS)
DECLARE_CCTK_ARGUMENTS;
DECLARE_CCTK_PARAMETERS;
- CCTK_INT index, var;
+ CCTK_INT /* index, */ var;
CCTK_INT totalsize;
CCTK_INT vectorstart;
CCTK_REAL *SandRDataArray;
+ CCTK_COMPLEX *SandRComplexDataArray;
totalsize = cctk_lsh[0] * cctk_lsh[1] * cctk_lsh[2];
@@ -96,6 +99,18 @@ void MoL_RestoreSandR(CCTK_ARGUMENTS)
memcpy(SandRDataArray, &SandRScratchSpace[vectorstart],
totalsize * sizeof(CCTK_REAL));
}
+
+ for (var = 0; var < MoLNumSandRComplexVariables; var++)
+ {
+
+ SandRComplexDataArray = (CCTK_COMPLEX *)CCTK_VarDataPtrI(cctkGH, 0,
+ SandRComplexVariableIndex[var]);
+
+ vectorstart = var * totalsize;
+
+ memcpy(SandRComplexDataArray, &ComplexSandRScratchSpace[vectorstart],
+ totalsize * sizeof(CCTK_COMPLEX));
+ }
return;