aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@082bdb00-0f4f-0410-b49e-b1835e5f2039>2010-04-01 18:15:39 +0000
committerschnetter <schnetter@082bdb00-0f4f-0410-b49e-b1835e5f2039>2010-04-01 18:15:39 +0000
commit95cc0805c203a442eb3ff7b4b0608ce3435ad2ef (patch)
treea33064774a536e61530b394c679a8d3b70d16670
parentf4b640f26b6e867402e23251206673fb40d431b7 (diff)
Correct symmetries for T_i(jk)
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/ReflectionSymmetry/trunk@35 082bdb00-0f4f-0410-b49e-b1835e5f2039
-rw-r--r--src/interpolate.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/interpolate.c b/src/interpolate.c
index 6868f5a..96d0977 100644
--- a/src/interpolate.c
+++ b/src/interpolate.c
@@ -164,7 +164,8 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
int table;
char tensortypealias[1000];
enum tensortype { UNKNOWN,
- SCALAR, VECTOR, SYMTENSOR, TENSOR, WEYLSCALARS_REAL, MANUALCARTESIAN };
+ SCALAR, VECTOR, SYMTENSOR, SYMTENSOR3, TENSOR,
+ WEYLSCALARS_REAL, MANUALCARTESIAN };
enum tensortype ttype;
CCTK_INT tensorparity;
int tcomponent;
@@ -280,8 +281,8 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
} else if (CCTK_EQUALS (tensortypealias, "ddd_sym")) {
/* 3rd rank tensor, symmetric in last 2 indices */
assert (numvars == 18);
- ttype = SYMTENSOR;
- tcomponent = (vi - firstvar) % 6;
+ ttype = SYMTENSOR3;
+ tcomponent = vi - firstvar;
} else if (CCTK_EQUALS (tensortypealias, "weylscalars_real")) {
/* Weyl scalars, stored as 10 real numbers */
assert (numvars == 10);
@@ -310,6 +311,9 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
case SYMTENSOR:
assert (tcomponent>=0 && tcomponent<6);
break;
+ case SYMTENSOR3:
+ assert (tcomponent>=0 && tcomponent<18);
+ break;
case TENSOR:
assert (tcomponent>=0 && tcomponent<9);
break;
@@ -357,6 +361,23 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
default: assert (0);
}
break;
+ case SYMTENSOR3:
+ switch (tcomponent % 6) {
+ case 0: break;
+ case 1: parities[0] = parities[1] = -1; break;
+ case 2: parities[0] = parities[2] = -1; break;
+ case 3: break;
+ case 4: parities[1] = parities[2] = -1; break;
+ case 5: break;
+ default: assert (0);
+ }
+ switch (tcomponent / 6) {
+ case 0: parities[0] *= -1; break;
+ case 1: parities[1] *= -1; break;
+ case 2: parities[2] *= -1; break;
+ default: assert (0);
+ }
+ break;
case TENSOR:
switch (tcomponent) {
case 0: break;