aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@082bdb00-0f4f-0410-b49e-b1835e5f2039>2005-05-04 15:10:10 +0000
committerschnetter <schnetter@082bdb00-0f4f-0410-b49e-b1835e5f2039>2005-05-04 15:10:10 +0000
commit3b507dc39a18e151bd6ed040664ac93a8fbe7c85 (patch)
tree297ccc870b702af275a4f1eae68e61179c224e5e
parente7932124fbc12a81b9a4bf5587c0c18394800f60 (diff)
Handle the tensor type alias "d".
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/ReflectionSymmetry/trunk@8 082bdb00-0f4f-0410-b49e-b1835e5f2039
-rw-r--r--src/apply.c7
-rw-r--r--src/interpolate.c3
2 files changed, 7 insertions, 3 deletions
diff --git a/src/apply.c b/src/apply.c
index 78a2bcb..4492579 100644
--- a/src/apply.c
+++ b/src/apply.c
@@ -227,6 +227,7 @@ BndReflectVI (cGH const * restrict const cctkGH,
/* Get and check tensor type information */
ierr = Util_TableGetString
(table, sizeof tensortypealias, tensortypealias, "tensortypealias");
+ int tensortype_is_explicit = 1;
if (ierr == UTIL_ERROR_TABLE_NO_SUCH_KEY) {
groupname = CCTK_GroupName(gi);
assert (groupname);
@@ -235,6 +236,7 @@ BndReflectVI (cGH const * restrict const cctkGH,
groupname);
free (groupname);
strcpy (tensortypealias, "scalar");
+ tensortype_is_explicit = 0;
} else if (ierr<0) {
groupname = CCTK_GroupName(gi);
assert (groupname);
@@ -249,7 +251,7 @@ BndReflectVI (cGH const * restrict const cctkGH,
if (CCTK_EQUALS (tensortypealias, "scalar"))
{
/* scalar */
- if (numvars != 1) {
+ if (numvars != 1 && ! tensortype_is_explicit) {
groupname = CCTK_GroupName(gi);
assert (groupname);
CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING,
@@ -260,7 +262,8 @@ BndReflectVI (cGH const * restrict const cctkGH,
ttype = SCALAR;
tcomponent = 0;
}
- else if (CCTK_EQUALS (tensortypealias, "u"))
+ else if (CCTK_EQUALS (tensortypealias, "u")
+ || CCTK_EQUALS (tensortypealias, "d"))
{
/* vector */
assert (numvars == 3);
diff --git a/src/interpolate.c b/src/interpolate.c
index cb58ba9..684dc1f 100644
--- a/src/interpolate.c
+++ b/src/interpolate.c
@@ -234,7 +234,8 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_,
ttype = SCALAR;
tcomponent = 0;
}
- else if (CCTK_EQUALS (tensortypealias, "u"))
+ else if (CCTK_EQUALS (tensortypealias, "u")
+ || CCTK_EQUALS (tensortypealias, "d"))
{
/* vector */
assert (numvars == 3);