aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-09-16 09:50:06 +0000
committerlanfer <lanfer@fa3da13c-9f13-4301-a575-cf5b8c5e1907>1999-09-16 09:50:06 +0000
commiteb47335ff03bc2c5bf5d94d315f619872461f7f1 (patch)
tree5264eb284824214ac340072147a5445846fcf961
parentb287b9f74ce346e9973f0e98be258e766080fdaf (diff)
compiles and runs again
git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@12 fa3da13c-9f13-4301-a575-cf5b8c5e1907
-rw-r--r--src/sor_flat.F6
-rw-r--r--src/sor_wrapper.c22
2 files changed, 15 insertions, 13 deletions
diff --git a/src/sor_flat.F b/src/sor_flat.F
index 735916d..a97bb5d 100644
--- a/src/sor_flat.F
+++ b/src/sor_flat.F
@@ -25,7 +25,7 @@
subroutine sor_flat_core3d(_CCTK_FARGUMENTS,
$ Mlinear_lsh,Mlinear,
$ Nsource_lsh,Nsource,
- $ var,
+ $ var,var_idx,
$ abstol,reltol)
implicit none
@@ -41,6 +41,8 @@
CCTK_REAL Nsource(Nsource_lsh(1),Nsource_lsh(2),Nsource_lsh(3))
CCTK_REAL var(cctk_lsh(1),cctk_lsh(2),cctk_lsh(3))
+ INTEGER var_idx
+
CCTK_REAL abstol(3),reltol(3)
CCTK_REAL tol
@@ -231,7 +233,7 @@ c call CCTK_WARN(1,"Reduction of norm failed!");
c endif
c#ifdef MPI
-c call synconefunc(var)
+c call CCTK_SyncGroupWithVarI(var_idx)
c#endif
residual = resnorm
diff --git a/src/sor_wrapper.c b/src/sor_wrapper.c
index d494a2a..af3b8e6 100644
--- a/src/sor_wrapper.c
+++ b/src/sor_wrapper.c
@@ -91,11 +91,11 @@ void sor_confmetric(cGH *GH, int *MetricPsiI, int FieldIndex,
}
-void sor_flat(cGH *GH, int *FieldIndex, int *MIndex,
- int *NIndex, int *AbsTol, int *RelTol) {
+void sor_flat(cGH *GH, int FieldIndex, int MIndex,
+ int NIndex, int *AbsTol, int *RelTol) {
CCTK_REAL *Mlinear=NULL, *Nsources=NULL;
- CCTK_REAL *var=NULL; CCTK_REAL tolerance;
+ CCTK_REAL *Field=NULL; CCTK_REAL tolerance;
int i;
int toltype;
@@ -104,25 +104,25 @@ void sor_flat(cGH *GH, int *FieldIndex, int *MIndex,
int retcode;
- var = (CCTK_REAL*) CCTK_VarDataPtrI(GH,0,*FieldIndex);
- if (*MIndex>0) Mlinear = (CCTK_REAL*) CCTK_VarDataPtrI(GH,0,*MIndex);
- if (*NIndex>0) Nsources = (CCTK_REAL*) CCTK_VarDataPtrI(GH,0,*NIndex);
+ Field = (CCTK_REAL*) CCTK_VarDataPtrI(GH,0,FieldIndex);
+ if (MIndex>0) Mlinear = (CCTK_REAL*) CCTK_VarDataPtrI(GH,0,MIndex);
+ if (NIndex>0) Nsources = (CCTK_REAL*) CCTK_VarDataPtrI(GH,0,NIndex);
if (GH->cctk_dim>3)
CCTK_WARN(0,"This elliptic solver implementation does not do dimension>3!");
for (i=0;i<GH->cctk_dim;i++) {
- if((*MIndex<0)) Mlinear_lsh[i]=1;
- else Mlinear_lsh[i]=GH->cctk_lsh[i];
- if((*NIndex<0)) Nsource_lsh[i]=1;
- else Nsource_lsh[i]=GH->cctk_lsh[i];
+ if((MIndex<0)) Mlinear_lsh[i]=1;
+ else Mlinear_lsh[i]=GH->cctk_lsh[i];
+ if((NIndex<0)) Nsource_lsh[i]=1;
+ else Nsource_lsh[i]=GH->cctk_lsh[i];
}
/* call the fortran routine */
FORTRAN_NAME(sor_flat_core3d)(_PASS_CCTK_C2F(GH),
Mlinear_lsh, Mlinear,
Nsource_lsh, Nsources,
- var, AbsTol, RelTol);
+ Field, FieldIndex, AbsTol, RelTol);
}