aboutsummaryrefslogtreecommitdiff
path: root/src/interpolate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interpolate.c')
-rw-r--r--src/interpolate.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/interpolate.c b/src/interpolate.c
index 884abe6..7c8831e 100644
--- a/src/interpolate.c
+++ b/src/interpolate.c
@@ -178,7 +178,7 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
int table;
char tensortypealias[1000];
- enum tensortype { UNKNOWN, SCALAR, VECTOR, TENSOR };
+ enum tensortype { UNKNOWN, SCALAR, VECTOR, TENSOR, WEYLSCALARS_REAL };
enum tensortype ttype;
CCTK_INT tensorparity;
int tcomponent;
@@ -224,8 +224,7 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
ttype = UNKNOWN;
tcomponent = 0;
- if (CCTK_EQUALS (tensortypealias, "scalar"))
- {
+ if (CCTK_EQUALS (tensortypealias, "scalar")) {
/* scalar */
if (numvars != 1) {
groupname = CCTK_GroupName(gi);
@@ -239,8 +238,7 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
tcomponent = 0;
}
else if (CCTK_EQUALS (tensortypealias, "u")
- || CCTK_EQUALS (tensortypealias, "d"))
- {
+ || CCTK_EQUALS (tensortypealias, "d")) {
/* vector */
assert (numvars == 3);
ttype = VECTOR;
@@ -251,6 +249,11 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
assert (numvars == 6);
ttype = TENSOR;
tcomponent = vi - firstvar;
+ } else if (CCTK_EQUALS (tensortypealias, "weylscalars_real")) {
+ /* Weyl scalars, stored as 10 real numbers */
+ assert (numvars == 10);
+ ttype = WEYLSCALARS_REAL;
+ tcomponent = vi - firstvar;
} else {
char * groupname = CCTK_GroupName(gi);
assert (groupname);
@@ -271,6 +274,9 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
case TENSOR:
assert (tcomponent>=0 && tcomponent<6);
break;
+ case WEYLSCALARS_REAL:
+ assert (tcomponent>=0 && tcomponent<10);
+ break;
default:
assert (0);
}
@@ -311,6 +317,24 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
default: assert (0);
}
break;
+ case WEYLSCALARS_REAL:
+ {
+ static int const weylparities[10][3] =
+ {{+1,+1,+1},
+ {-1,-1,-1},
+ {+1,+1,-1},
+ {-1,-1,+1},
+ {+1,+1,+1},
+ {-1,-1,-1},
+ {+1,+1,-1},
+ {-1,-1,+1},
+ {+1,+1,+1},
+ {-1,-1,-1}};
+ for (dir=0; dir<3; ++dir) {
+ parities[dir] = weylparities[tcomponent][dir];
+ }
+ }
+ break;
default:
assert (0);
}