aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib/src/copy_3d_real8.F77
diff options
context:
space:
mode:
authorschnetter <>2004-03-11 10:01:00 +0000
committerschnetter <>2004-03-11 10:01:00 +0000
commitf0c2525f35886387331eabda7aba7e6c69bbd2dd (patch)
treeb31661720b5f0d8f20eb065ae6bdf769f73706c4 /Carpet/CarpetLib/src/copy_3d_real8.F77
parentad728f0c490ccb5f1425f39fe15651f3560b71ff (diff)
Ensure that the array extents are multiples of the array strides
darcs-hash:20040311100134-07bb3-941d3d682503b7dc4066a4ab7aaf05ba1951d0a0.gz
Diffstat (limited to 'Carpet/CarpetLib/src/copy_3d_real8.F77')
-rw-r--r--Carpet/CarpetLib/src/copy_3d_real8.F777
1 files changed, 6 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/copy_3d_real8.F77 b/Carpet/CarpetLib/src/copy_3d_real8.F77
index 43507cdd3..716ffd135 100644
--- a/Carpet/CarpetLib/src/copy_3d_real8.F77
+++ b/Carpet/CarpetLib/src/copy_3d_real8.F77
@@ -1,5 +1,5 @@
c -*-Fortran-*-
-c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/copy_3d_real8.F77,v 1.7 2003/11/05 16:18:39 schnetter Exp $
+c $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/copy_3d_real8.F77,v 1.8 2004/03/11 12:03:09 schnetter Exp $
#include "cctk.h"
#include "cctk_Parameters.h"
@@ -54,6 +54,11 @@ c bbox(:,3) is stride
c This could be handled, but is likely to point to an error elsewhere
call CCTK_WARN (0, "Internal error: region extent is empty")
end if
+ if (mod(srcbbox(d,2) - srcbbox(d,1), srcbbox(d,3)).ne.0
+ $ .or. mod(dstbbox(d,2) - dstbbox(d,1), dstbbox(d,3)).ne.0
+ $ .or. mod(regbbox(d,2) - regbbox(d,1), regbbox(d,3)).ne.0) then
+ call CCTK_WARN (0, "Internal error: array extents are not integer multiples of the strides")
+ end if
if (regbbox(d,1).lt.srcbbox(d,1)
$ .or. regbbox(d,1).lt.dstbbox(d,1)
$ .or. regbbox(d,2).gt.srcbbox(d,2)