From 3b507dc39a18e151bd6ed040664ac93a8fbe7c85 Mon Sep 17 00:00:00 2001 From: schnetter Date: Wed, 4 May 2005 15:10:10 +0000 Subject: Handle the tensor type alias "d". git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/ReflectionSymmetry/trunk@8 082bdb00-0f4f-0410-b49e-b1835e5f2039 --- src/apply.c | 7 +++++-- src/interpolate.c | 3 ++- 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); -- cgit v1.2.3