diff options
Diffstat (limited to 'src/sor_flat.F')
-rw-r--r-- | src/sor_flat.F | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/sor_flat.F b/src/sor_flat.F index 889ae52..04cfc94 100644 --- a/src/sor_flat.F +++ b/src/sor_flat.F @@ -81,6 +81,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 @@ -96,6 +99,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, "EllLinFlat::Bnd::Robin::V0") + call Ell_GetIntKey (ierr, npow, "EllLinFlat::Bnd::Robin::V1") + 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 @@ -228,7 +241,7 @@ c Reduce the norm call CCTK_WARN(1,"Reduction of norm failed!"); endif residual = resnorm - + c Synchronize the variables call CCTK_SyncGroupWithVarI(cctkGH, var_idx) @@ -236,12 +249,10 @@ c Synchronize the variables goto 123 endif -c Apply Robin boundary +c Apply boundary conditions +c call Ell_GetStringKey(nchar, mybound,"EllLinFlat::Bnd) if (CCTK_EQUALS(sor_bound,"robin")) then - 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 apply Robin BC !") endif |