diff options
author | lanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907> | 1999-11-04 13:02:18 +0000 |
---|---|---|
committer | lanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907> | 1999-11-04 13:02:18 +0000 |
commit | 97abded0c81669bba2fc96d2dbcf146cf0ae3ad6 (patch) | |
tree | 7fb3f937106c6297de5259f8bf37d7842117c5a7 | |
parent | 6768fbb7bb91cf659df49bc4735dc68da0741f9f (diff) |
more fixes
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@35 fa3da13c-9f13-4301-a575-cf5b8c5e1907
-rw-r--r-- | src/sor_confmetric.F | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/sor_confmetric.F b/src/sor_confmetric.F index 255f391..bb75fd4 100644 --- a/src/sor_confmetric.F +++ b/src/sor_confmetric.F @@ -94,6 +94,9 @@ c Coeeficients for the solver: 19 point stencil... CCTK_REAL ane,anw,ase,asw,ate,atw CCTK_REAL abe,abw,atn,ats,abn,asb + CCTK_REAL finf + CCTK_INT npow + logical cheb, const, none, verb integer Mlinear_storage,Nsource_storage INTEGER reduction_handle,ierr @@ -109,6 +112,16 @@ c Get the reduction handel for the sum operation call CCTK_WARN(1,"Cannot get reduction handle.") endif +c Set boundary related variables + if (CCTK_EQUALS(sor_bound,"robin")) then + sw(1)=1 + sw(2)=1 + sw(2)=1 + + call Ell_GetRealKey(ierr, finf, "EllLinConfMetric::Bnd::Robin::inf") + call Ell_GetIntKey (ierr, npow, "EllLinConfMetric::Bnd::Robin::falloff") + end if + c We have no storage for M/N if they are of size one in each direction if ((Mlinear_lsh(1).eq.1).and.(Mlinear_lsh(2).eq.1).and.(Mlinear_lsh(3).eq.1)) then Mlinear_storage=0 @@ -148,9 +161,9 @@ c none = contains("sor_accel","none").ne.0 if (verb .and. none) $ print *,"Un-accelearted relaxation (omega = 1)" - two = 2.0D0 - four = 4.0D0 - resnorm = 0 + two = 2.0D0 + four = 4.0D0 + resnorm = 0.0d0 c compute determinant det= -(gxz**2*gyy) + 2*gxy*gxz*gyz - gxx*gyz**2 @@ -273,6 +286,7 @@ c Reduce the norm call CCTK_WARN(1,"Reduction of norm failed!"); endif residual = resnorm + residual = residual / (cctk_gsh(1)*cctk_gsh(2)*cctk_gsh(3)) call CCTK_SyncGroupWithVarI(cctkGH, var_idx) @@ -281,15 +295,10 @@ c Reduce the norm endif c Apply Robin boundary -c write (*,*) "Robin ?" if (CCTK_EQUALS(sor_bound,"robin")) then -c write (*,*) "Robin" - sw(1)=1 - sw(2)=1 - sw(2)=1 -c call RobinBCVarI(ierr, cctkGH, 1.0, 1, sw, var_idx); + call RobinBCVarI(ierr, cctkGH, finf, npow, sw, var_idx); if (ierr.ne.0) then - call CCTK_WARN(1,"Could not Robin BC !") + call CCTK_WARN(1,"Could not apply Robin BC !") endif endif |