From 963d279d4afd88fb3bad2059c298d9db44d4b674 Mon Sep 17 00:00:00 2001 From: lanfer Date: Mon, 1 Nov 1999 13:54:32 +0000 Subject: infrastructure, some fixes, database... git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@29 fa3da13c-9f13-4301-a575-cf5b8c5e1907 --- src/Startup.c | 8 +------- src/sor_flat.F | 23 +++++++++++++++++------ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/Startup.c b/src/Startup.c index 5d15a12..4cef1e2 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -31,13 +31,7 @@ void EllSOR_Register(cGH *GH) { Ell_RegisterSolver(sor_flat,"sor","Ell_LinFlat"); /* Register boundary SOR can handle */ - err = Ell_CreateKey(CCTK_VARIABLE_STRING,"EllSOR::Bbd::Robin"); + err = Ell_CreateKey(CCTK_VARIABLE_STRING,"EllSOR::Bnd::Robin"); err = Ell_CreateKey(CCTK_VARIABLE_STRING,"EllSOR::Bnd::Const"); - /* Register the variables needed to use these boundaries */ - err = Ell_CreateKey(CCTK_VARIABLE_REAL, "EllLinConfMetric::Bnd::Robin::V0"); - err = Ell_CreateKey(CCTK_VARIABLE_REAL, "EllLinConfMetric::Bnd::Robin::V1"); - err = Ell_CreateKey(CCTK_VARIABLE_REAL, "EllLinConfMetric::BND::Const::V0"); - - } 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 -- cgit v1.2.3