From ecbcc7c552e28c23a625af2d20fae1130cf9e126 Mon Sep 17 00:00:00 2001 From: lanfer Date: Fri, 17 Sep 1999 12:26:19 +0000 Subject: misc git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@13 fa3da13c-9f13-4301-a575-cf5b8c5e1907 --- src/sor_wrapper.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/sor_wrapper.c b/src/sor_wrapper.c index af3b8e6..5cb3bbd 100644 --- a/src/sor_wrapper.c +++ b/src/sor_wrapper.c @@ -72,12 +72,12 @@ void sor_confmetric(cGH *GH, int *MetricPsiI, int FieldIndex, if (GH->cctk_dim>3) CCTK_WARN(0,"This elliptic solver implementation does not do dimension>3!"); + for (i=0;icctk_dim;i++) { if((MIndex<0)) Mlinear_lsh[i]=1; - else Mlinear_lsh[i]=GH->cctk_lsh[i]; + else Mlinear_lsh[i]=GH->cctk_lsh[i]; if((NIndex<0)) Nsource_lsh[i]=1; - else Nsource_lsh[i]=GH->cctk_lsh[i]; - printf("%d %d \n",Nsource_lsh[i],Mlinear_lsh[i]); + else Nsource_lsh[i]=GH->cctk_lsh[i]; } @@ -92,7 +92,7 @@ void sor_confmetric(cGH *GH, int *MetricPsiI, int FieldIndex, void sor_flat(cGH *GH, int FieldIndex, int MIndex, - int NIndex, int *AbsTol, int *RelTol) { + int NIndex, CCTK_REAL *AbsTol, CCTK_REAL *RelTol) { CCTK_REAL *Mlinear=NULL, *Nsources=NULL; CCTK_REAL *Field=NULL; CCTK_REAL tolerance; @@ -104,6 +104,8 @@ void sor_flat(cGH *GH, int FieldIndex, int MIndex, int retcode; + + 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); @@ -117,12 +119,15 @@ void sor_flat(cGH *GH, int FieldIndex, int MIndex, if((NIndex<0)) Nsource_lsh[i]=1; else Nsource_lsh[i]=GH->cctk_lsh[i]; } - + + printf("fieldindex: %d %s \n",FieldIndex,CCTK_FullName(FieldIndex)); + + /* call the fortran routine */ FORTRAN_NAME(sor_flat_core3d)(_PASS_CCTK_C2F(GH), Mlinear_lsh, Mlinear, Nsource_lsh, Nsources, - Field, FieldIndex, AbsTol, RelTol); + Field, &FieldIndex, AbsTol, RelTol); } -- cgit v1.2.3