diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-04-13 20:17:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-04-13 20:17:00 +0000 |
commit | 835334829850011a7625ad6c98bcc5bd0220e2f4 (patch) | |
tree | 4a899396b88691235f8cd3f3857273a10406ec1b | |
parent | 2f64963a80fe0f511796ae31253d716c8aa690c9 (diff) |
CarpetReduce: Check whether input and output types agree
darcs-hash:20060413201723-dae7b-59318803a1ad41a05efde70bc212cd9a37c260f8.gz
-rw-r--r-- | Carpet/CarpetReduce/src/reduce.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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<num_dims; ++d) { assert (dims[d]>=0); |