aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-11-01 13:54:32 +0000
committerlanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-11-01 13:54:32 +0000
commit963d279d4afd88fb3bad2059c298d9db44d4b674 (patch)
tree935280d692ae2f447e8230f42610c7f5980150e7
parent7da90d51e09fd55ab215b01dad05ac84decc0372 (diff)
infrastructure, some fixes, database...
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@29 fa3da13c-9f13-4301-a575-cf5b8c5e1907
-rw-r--r--src/Startup.c8
-rw-r--r--src/sor_flat.F23
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