From b1b623e51da66ab731dda3246a4f66e16600dd9d Mon Sep 17 00:00:00 2001 From: hawke Date: Wed, 9 Jul 2003 08:46:15 +0000 Subject: Change the local_spatial_order within the loop to cope with boundaries when using fourth order differencing. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMConstraints/trunk@90 b7a48df3-cbbf-4440-997f-b4b717c9f7fc --- src/ADMConstraints.F | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/ADMConstraints.F b/src/ADMConstraints.F index cb8db2f..f896b37 100644 --- a/src/ADMConstraints.F +++ b/src/ADMConstraints.F @@ -111,6 +111,14 @@ c Calculate constraints. do j=2,ny-1 do i=2,nx-1 + if ( (i<3).or.(i>cctk_lsh(1)-2).or. + . (j<3).or.(j>cctk_lsh(2)-2).or. + . (k<3).or.(k>cctk_lsh(3)-2) ) then + local_spatial_order = 2 + else + local_spatial_order = spatial_order + end if + docalc = .TRUE. if (use_mask .eq. 1) then -- cgit v1.2.3