aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-09-17 12:26:51 +0000
committerlanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-09-17 12:26:51 +0000
commitb82786acb389ef0fd65de0aaa0a7a03179166360 (patch)
tree66cf5cd69107a3e3f2a08c981bb77b249c28f0bb
parentecbcc7c552e28c23a625af2d20fae1130cf9e126 (diff)
going parallel...
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@14 fa3da13c-9f13-4301-a575-cf5b8c5e1907
-rw-r--r--src/sor_flat.F58
1 files changed, 34 insertions, 24 deletions
diff --git a/src/sor_flat.F b/src/sor_flat.F
index a97bb5d..2710cc0 100644
--- a/src/sor_flat.F
+++ b/src/sor_flat.F
@@ -85,11 +85,14 @@ c Coeeficients for the solver: 19 point stencil...
integer Mlinear_storage,Nsource_storage
INTEGER reduction_handle,ierr
+c stencil size
+ INTEGER sw(3)
+
c#ifdef MPI
c include 'mpif.h'
c INTEGER ierror
-c#endif
-
+c#endif
+
tol = AbsTol(1)
c Get the reduction handel for the sum operation
@@ -226,20 +229,16 @@ c Update
end do
c Reduce the norm
-c call CCTK_ReduceLocalScalar(cctkGH, ierr, -1, reduction_handle,
-c $ residual, resnorm, CCTK_VARIABLE_REAL)
-c if (ierr.ne.0) then
-c call CCTK_WARN(1,"Reduction of norm failed!");
-c endif
+ call CCTK_ReduceLocalScalar(cctkGH, ierr, -1, reduction_handle,
+ $ resnorm, residual, CCTK_VARIABLE_REAL)
+ if (ierr.ne.0) then
+ call CCTK_WARN(1,"Reduction of norm failed!");
+ endif
-c#ifdef MPI
-c call CCTK_SyncGroupWithVarI(var_idx)
-c#endif
residual = resnorm
+
+ call CCTK_SyncGroupWithVarI(cctkGH, var_idx)
-c write(*,*)'what is nx0: ',nx0 WHAT IS THIS ??
-c residual = residual / (nx0 * ny0 * nz0)
-c Stop?
if (residual .lt. tol) then
goto 123
@@ -247,17 +246,28 @@ c Stop?
c FIXME: what about boudnary conditions, like robin, etc.
c Apply octant Symmetries
- if (octant) then
- if (cctk_bbox(1) .eq. 1) then
- var(1,:,:) = var(2,:,:)
- endif
- if (cctk_bbox(3) .eq. 1) then
- var(:,1,:) = var(:,2,:)
- endif
- if (cctk_bbox(5) .eq. 1) then
- var(:,:,1) = var(:,:,2)
- endif
- endif
+ sw(1)=1
+ sw(2)=1
+ sw(2)=1
+c call FlatBCVarI(ierr,cctkGH,sw,var_idx);
+c if (ierr.ne.0) then
+c call CCTK_WARN(1,"Could not apply BC !")
+c endif
+
+
+ call ApplySymmetryVarI(cctkGH, var_idx)
+
+c if (octant) then
+c if (cctk_bbox(1) .eq. 1) then
+c var(1,:,:) = var(2,:,:)
+c endif
+c if (cctk_bbox(3) .eq. 1) then
+c var(:,1,:) = var(:,2,:)
+c endif
+c if (cctk_bbox(5) .eq. 1) then
+c var(:,:,1) = var(:,:,2)
+c endif
+c endif
enddo