aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknarf <knarf@20f44201-0f4f-0410-9130-e5fc2714a787>2011-08-12 13:24:48 +0000
committerknarf <knarf@20f44201-0f4f-0410-9130-e5fc2714a787>2011-08-12 13:24:48 +0000
commit3a8cc0d7cec63a12eb45a1c6dcfdfeb303671e19 (patch)
tree1d60839573847da45ca7e8aa343458e2184eb2be
parentf1b9660b61fafe186e9b77ec71f0266fcc2ad5f6 (diff)
provide better error message in case variables have the wrong tensortype
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/RotatingSymmetry180/trunk@64 20f44201-0f4f-0410-9130-e5fc2714a787
-rw-r--r--src/interpolate.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interpolate.c b/src/interpolate.c
index 2813c83..6fb3b16 100644
--- a/src/interpolate.c
+++ b/src/interpolate.c
@@ -77,6 +77,14 @@ Rot180_CheckTensorTypes (CCTK_ARGUMENTS)
} else if (CCTK_EQUALS (tensortypealias, "u")
|| CCTK_EQUALS (tensortypealias, "d")) {
/* vector */
+ if (numvars != 3) {
+ char * groupname = CCTK_GroupName(gi);
+ assert (groupname);
+ CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
+ "Group \"%s\" has the tensor type alias \"u\", but does not contain 3 elements (but %d)",
+ groupname, numvars);
+ free (groupname);
+ }
assert (numvars == 3);
} else if (CCTK_EQUALS (tensortypealias, "4u")
|| CCTK_EQUALS (tensortypealias, "4d")) {