From 2540d470a01ec6ae5b571c9587ec01e1d6ce0256 Mon Sep 17 00:00:00 2001 From: allen Date: Wed, 12 Jan 2000 14:00:09 +0000 Subject: Adding USE_CCTK_PARAMETERS and fixing compiler warnings git-svn-id: http://svn.cactuscode.org/arrangements/CactusElliptic/EllSOR/trunk@47 fa3da13c-9f13-4301-a575-cf5b8c5e1907 --- src/Startup.c | 2 ++ src/sor_wrapper.c | 23 +++++++++++------------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/Startup.c b/src/Startup.c index 9d49698..61df3a9 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -54,4 +54,6 @@ void EllSOR_Register(cGH *GH) err = Ell_CreateKey(CCTK_VARIABLE_STRING,"EllSOR::Bnd::Robin"); err = Ell_CreateKey(CCTK_VARIABLE_STRING,"EllSOR::Bnd::Const"); + USE_CCTK_PARAMETERS + } diff --git a/src/sor_wrapper.c b/src/sor_wrapper.c index d1ce7fa..d9fd865 100644 --- a/src/sor_wrapper.c +++ b/src/sor_wrapper.c @@ -70,14 +70,10 @@ void sor_confmetric(cGH *GH, CCTK_REAL *Mlinear=NULL, *Nsources=NULL; CCTK_REAL *Field =NULL; - CCTK_REAL tolerance; - int i; - int toltype; + int i; int Mlinear_lsh[3], Nsource_lsh[3]; - int retcode; - /* derive the metric data pointer from the index array. Note the ordering. Also get datapointers to the field to solve for. All of these are mandatory */ @@ -138,13 +134,10 @@ int sor_flat(cGH *GH, CCTK_REAL *RelTol) { int ierr; - int retval=0; CCTK_REAL *Mlinear=NULL, *Nsources=NULL; - CCTK_REAL *Field=NULL; CCTK_REAL tolerance; + CCTK_REAL *Field=NULL; int i; - int toltype; int Mlinear_lsh[3], Nsource_lsh[3]; - int retcode; Field = (CCTK_REAL*) CCTK_VarDataPtrI(GH,0,FieldIndex); @@ -152,13 +145,19 @@ int sor_flat(cGH *GH, 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;icctk_dim;i++) { + } + + for (i=0;icctk_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]; + else + { + Nsource_lsh[i]=GH->cctk_lsh[i]; + } } /* call the fortran routine */ -- cgit v1.2.3