aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorallen <allen@fa3da13c-9f13-4301-a575-cf5b8c5e1907>2000-01-12 14:00:09 +0000
committerallen <allen@fa3da13c-9f13-4301-a575-cf5b8c5e1907>2000-01-12 14:00:09 +0000
commit2540d470a01ec6ae5b571c9587ec01e1d6ce0256 (patch)
tree03f80e5f816b1f1ebafffab9f898cfe3ca1bd6e4
parentd1fbbc801430c55548058b4ff7dbcdfffd630079 (diff)
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
-rw-r--r--src/Startup.c2
-rw-r--r--src/sor_wrapper.c23
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;i<GH->cctk_dim;i++) {
+ }
+
+ 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];
+ else
+ {
+ Nsource_lsh[i]=GH->cctk_lsh[i];
+ }
}
/* call the fortran routine */