From 835334829850011a7625ad6c98bcc5bd0220e2f4 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Thu, 13 Apr 2006 20:17:00 +0000 Subject: CarpetReduce: Check whether input and output types agree darcs-hash:20060413201723-dae7b-59318803a1ad41a05efde70bc212cd9a37c260f8.gz --- Carpet/CarpetReduce/src/reduce.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Carpet/CarpetReduce/src/reduce.cc b/Carpet/CarpetReduce/src/reduce.cc index 59feb34c0..2988e468c 100644 --- a/Carpet/CarpetReduce/src/reduce.cc +++ b/Carpet/CarpetReduce/src/reduce.cc @@ -798,6 +798,15 @@ namespace CarpetReduce { assert (inarrays[n]); } + if (intype != outtype) { + char const * const intypename = CCTK_VarTypeName (intype); + char const * const outtypename = CCTK_VarTypeName (outtype); + CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, + "The input type must be the same as the output type. Requested were intype=%s, outtype=%s.", + intypename, outtypename); + return -1; + } + assert (num_dims>=0 && num_dims<=dim); for (int d=0; d=0); -- cgit v1.2.3