From 946022cb0e32c71ba518fcb4ab849f2db6429ff8 Mon Sep 17 00:00:00 2001 From: diener Date: Mon, 3 Nov 2003 20:18:36 +0000 Subject: Fixed the fuzzy comparison of the mask, since 'if (emask.ne.1)' has to be translated into 'if (abs(emask-1)>0.001)' instead of the previous suggestions of 'if (abs(emask-1)<0.001)' or 'if(abs(emask)<0.001)'. Also changed the width of the boundary to 1 instead of 0 in the calls to Boundary_SelectGroupForBC. Otherwise the boundary conditions are not applied. Please run the testsuites before committing stuff like this. In this case the errors could have easily been caught before committing, since the testsuites for ADMConstraints were in fact all broken. git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/ADMConstraints/trunk@98 b7a48df3-cbbf-4440-997f-b4b717c9f7fc --- src/ADMConstraints.F | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ADMConstraints.F b/src/ADMConstraints.F index 6dc45a7..35d2f83 100644 --- a/src/ADMConstraints.F +++ b/src/ADMConstraints.F @@ -118,7 +118,7 @@ c Calculate constraints. docalc = .TRUE. if (use_mask .eq. 1) then - if (abs(emask(i,j,k)) < 0.001) then + if (abs(emask(i,j,k)-1) > 0.001) then docalc = .FALSE. end if end if @@ -267,18 +267,18 @@ c Apply symmetry boundary conditions. c Apply flat boundary conditions at outer boundaries. if (CCTK_Equals(bound,"flat") == 1) then - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 0, -1, + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, $ "admconstraints::hamiltonian", "Flat") - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 0, -1, + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, $ "admconstraints::normalized_hamiltonian", "Flat") - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 0, -1, + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, $ "admconstraints::momentum", "Flat") else - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 0, -1, + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, $ "admconstraints::hamiltonian", "None") - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 0, -1, + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, $ "admconstraints::normalized_hamiltonian", "None") - ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 0, -1, + ierr = Boundary_SelectGroupForBC(cctkGH, CCTK_ALL_FACES, 1, -1, $ "admconstraints::momentum", "None") end if -- cgit v1.2.3