From 28ebf77b8e00bdac6999967b5c828e54f76c93e6 Mon Sep 17 00:00:00 2001 From: rhaas Date: Tue, 1 May 2012 23:39:38 +0000 Subject: correct handling of tensorparity=-1 quantities during interpolation this fixes https://trac.einsteintoolkit.org/ticket/254 and https://trac.einsteintoolkit.org/ticket/851 git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/ReflectionSymmetry/trunk@48 082bdb00-0f4f-0410-b49e-b1835e5f2039 --- src/interpolate.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/interpolate.c b/src/interpolate.c index fcaa51a..8c1f61b 100644 --- a/src/interpolate.c +++ b/src/interpolate.c @@ -297,7 +297,7 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_, assert (groupname); CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING, "Illegal tensor type alias \"%s\" for group \"%s\"", - tensortypealias, groupname); + tensortypealias, groupname); free (groupname); } @@ -434,23 +434,24 @@ ReflectionSymmetry_Interpolate (CCTK_POINTER_TO_CONST restrict const cctkGH_, /* Are there negative parities? */ needs_checking = 0; for (dir=0; dir<3; ++dir) { - check_dir[dir] = do_reflection[2*dir] && parities[dir] < 0; + check_dir[dir] = do_reflection[2*dir] && parities[dir]*tensorparity < 0; needs_checking |= check_dir[dir]; } + /* Loop over all points and unfold */ if (needs_checking) { for (n=0; n