aboutsummaryrefslogtreecommitdiff
path: root/src/IsoSurfacer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/IsoSurfacer.c')
-rw-r--r--src/IsoSurfacer.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/IsoSurfacer.c b/src/IsoSurfacer.c
index 6da43c7..366e552 100644
--- a/src/IsoSurfacer.c
+++ b/src/IsoSurfacer.c
@@ -156,13 +156,13 @@ static int IsoSurfacerHandleCommands(cGH *GH)
return 0;
}
-static int doIso(int index, cGH *GH, isosurfacerGH *myGH)
+static int doIso(int vindex, cGH *GH, isosurfacerGH *myGH)
{
char *fullname;
if(!myGH->RunIsoSurfacer) return 0;
- fullname = CCTK_FullName (index);
+ fullname = CCTK_FullName (vindex);
/* printf("Check doIso: fullname[%s]:[%s]",fullname,myGH->funcName);*/
if(CCTK_Equals(fullname,myGH->funcName)){
if(myGH->firstIteration<=GH->cctk_iteration &&
@@ -177,20 +177,20 @@ static int doIso(int index, cGH *GH, isosurfacerGH *myGH)
}
-static void computeIso(int index, cGH *GH, isosurfacerGH *myGH)
+static void computeIso(int vindex, cGH *GH, isosurfacerGH *myGH)
{
DECLARE_CCTK_PARAMETERS
/* is it really required to have this static here?? */
char* fullname;
- int i,j;
+ int i;
int nx,ny,nz;
CCTK_REAL *xcoords,*ycoords,*zcoords,*data;
int timelevel=0;
if(!myGH->RunIsoSurfacer) return; /* not running */
- fullname = CCTK_FullName (index);
- data = (CCTK_REAL *) GH->data [index][timelevel];
+ fullname = CCTK_FullName (vindex);
+ data = (CCTK_REAL *) GH->data [vindex][timelevel];
nx=GH->cctk_lsh[0]; ny=GH->cctk_lsh[1]; nz=GH->cctk_lsh[2];
/* get the data pointer to the current timelevel of GF X */
@@ -212,10 +212,10 @@ static void computeIso(int index, cGH *GH, isosurfacerGH *myGH)
int handle;
handle = CCTK_ReductionHandle ("minimum");
CCTK_Reduce (GH, 0,handle,1,CCTK_VARIABLE_REAL,
- &(myGH->minval),1, index);
+ &(myGH->minval),1, vindex);
handle = CCTK_ReductionHandle ("maximum");
CCTK_Reduce (GH, 0, handle, 1, CCTK_VARIABLE_REAL,
- &(myGH->maxval), 1, index);
+ &(myGH->maxval), 1, vindex);
}
if (CCTK_MyProc (GH) == 0){
@@ -438,6 +438,10 @@ void WriteSock(cGH *GH, polypatch *totals, isosurfacerGH *myGH,
CCTK_REAL4 *verts;
CCTK_INT4 tmppolys[3] = {0,0,0};
CCTK_REAL4 tmpverts[3] = {0.0,0.0,0.0};
+
+ isoindex = isoindex;
+ IsoValue = IsoValue;
+
/* Needs to collect min/max here */
sprintf(tmpstring," :%s[0]=%f,%u range=%f:%f",
fullname,myGH->isovalue,
@@ -474,8 +478,8 @@ static void WriteHDF5(cGH *GH, polypatch *totals, isosurfacerGH *myGH,
strlen (PUGH_pGH (GH)->identity_string) + 20);
sprintf (filename, "%s/%s%s.iso.h5", outdir, fullname,
PUGH_pGH (GH)->identity_string);
-#if 0 /* disabled for now */
/* needs to extract min/max value for GF with CCTK_Reduction op*/
+#if 0 /* disabled for now */
IOHDF5_WriteIsosurface (GH, filename, fullname,
(CCTK_INT) GH->cctk_iteration,
(CCTK_INT) GridAll.timelevel,
@@ -490,6 +494,12 @@ static void WriteHDF5(cGH *GH, polypatch *totals, isosurfacerGH *myGH,
CCTK_WARN (1, "No HDF5 isosurface output because CactusPUGHIO/IOHDF5 was not compiled in !");
#endif
+ GH = GH;
+ totals = totals;
+ myGH = myGH;
+ fullname = fullname;
+ isoindex = isoindex;
+ IsoValue = IsoValue;
}
/***************************************************************************/