aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-11-26 19:39:55 +0000
committerlanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-11-26 19:39:55 +0000
commit35a306354967d9a091ebc3153a007470c29d3ad0 (patch)
treeafc6e7f1812abcc2b0a6a21c7566deb160a1f8a3
parentb10477ea9f197946f9a449e0897829df4a88b4dd (diff)
bug fix, the hangup does not occur anymore (on my laptop
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@42 fa3da13c-9f13-4301-a575-cf5b8c5e1907
-rw-r--r--src/sor_flat.F14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sor_flat.F b/src/sor_flat.F
index ac50027..e36514a 100644
--- a/src/sor_flat.F
+++ b/src/sor_flat.F
@@ -11,6 +11,7 @@
#include "cctk_arguments.h"
#include "cctk_parameters.h"
+
/*@@
@routine sor
@date Thu Apr 24 13:29:52 1997
@@ -86,7 +87,7 @@ c Coeeficients for the solver: 19 point stencil...
logical cheb, const, none, verb
integer Mlinear_storage,Nsource_storage
- INTEGER reduction_handle,ierr
+ INTEGER sum_handle,ierr
c stencil size
INTEGER sw(3)
@@ -94,8 +95,8 @@ c stencil size
tol = AbsTol(1)
c Get the reduction handel for the sum operation
- call CCTK_ReductionArrayHandle(reduction_handle,"sum");
- if (reduction_handle.lt.0) then
+ call CCTK_ReductionArrayHandle(sum_handle,"sum");
+ if (sum_handle.lt.0) then
call CCTK_WARN(1,"Cannot get reduction handle.")
endif
@@ -157,7 +158,7 @@ c none = contains("sor_accel","none").ne.0
as = 1.0d0/dy**2.
at = 1.0d0/dz**2.
ab = 1.0d0/dz**2.
- ac_orig = -2.0d0/dx**2 - 2.0d0/dy**2 - 2.0d0/dz**2
+ ac_orig = -2.0d0/dx**2. - 2.0d0/dy**2. - 2.0d0/dz**2.
do sor_iteration=1,maxit
@@ -215,13 +216,14 @@ c Update
end do
c Reduce the norm
- call CCTK_ReduceLocalScalar(ierr, cctkGH, -1, reduction_handle,
+ call CCTK_ReduceLocalScalar(ierr, cctkGH, -1, sum_handle,
$ resnorm, residual, CCTK_VARIABLE_REAL)
if (ierr.ne.0) then
call CCTK_WARN(1,"Reduction of norm failed!");
endif
- residual = resnorm
+
residual = residual / (cctk_gsh(1)*cctk_gsh(2)*cctk_gsh(3))
+
c write (*,*) "Iteration/Norm",sor_iteration,residual
c Synchronize the variables