diff options
author | tradke <tradke@bfcf8e34-485d-4d46-a995-1fd6fa6fb178> | 2004-05-08 19:03:15 +0000 |
---|---|---|
committer | tradke <tradke@bfcf8e34-485d-4d46-a995-1fd6fa6fb178> | 2004-05-08 19:03:15 +0000 |
commit | 12825963196aa376dd4e758d0194706527173656 (patch) | |
tree | 860ee20130b5b5ceef6a58c78b394cf3cdf2e92a | |
parent | 468f34d8f195a616f6a4ec92601259e3a82e8001 (diff) |
Remove calls to deprecated CCTK_Coord*() routines and use aliased functions
from CoordBase instead.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IsoSurfacer/trunk@75 bfcf8e34-485d-4d46-a995-1fd6fa6fb178
-rw-r--r-- | src/IsoSurfacer.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/IsoSurfacer.c b/src/IsoSurfacer.c index f779eb9..dc36dbc 100644 --- a/src/IsoSurfacer.c +++ b/src/IsoSurfacer.c @@ -183,32 +183,33 @@ static int doIso(int vindex, const cGH *GH, isosurfacerGH *myGH) static void computeIso(int vindex, const cGH *GH, isosurfacerGH *myGH) { DECLARE_CCTK_PARAMETERS - /* is it really required to have this static here?? */ - char* fullname; - int i; + char *fullname, *groupname; + int i, coord_index, coord_system_handle; int nx,ny,nz; - CCTK_REAL *xcoords,*ycoords,*zcoords,*data; - int timelevel=0; + CCTK_REAL *coords[3],*data; + CCTK_INT coord_handles[3]; if(!myGH->RunIsoSurfacer) return; /* not running */ fullname = CCTK_FullName (vindex); - data = (CCTK_REAL *) GH->data [vindex][timelevel]; + data = GH->data [vindex][0]; 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 */ - i = CCTK_CoordIndex (-1,"x","cart3d"); - timelevel = 0; /* first time... get proper timelevel */ - xcoords = (CCTK_REAL *) CCTK_VarDataPtrI (GH, timelevel, i); - /* get the data pointer to the current timelevel of GF Y */ - i = CCTK_CoordIndex (-1,"y","cart3d"); - ycoords = (CCTK_REAL *) CCTK_VarDataPtrI (GH, timelevel, i); - /* get the data pointer to the current timelevel of GF Z */ - i = CCTK_CoordIndex (-1,"z","cart3d"); - zcoords = (CCTK_REAL *) CCTK_VarDataPtrI (GH, timelevel, i); + groupname = CCTK_GroupNameFromVarI (vindex); + coord_system_handle = Coord_GroupSystem (GH, groupname); + free (groupname); + + Util_TableGetIntArray (coord_system_handle, 3, coord_handles, "COORDINATES"); + for (i = 0; i < 3; i++) + { + Util_TableGetInt (coord_handles[i], &coord_index, "GAINDEX"); + coords[i] = CCTK_VarDataPtrI (GH, 0, coord_index); + } + /* Actually perform the Isosurfacing Operation */ - NuFindSurface(data,nx,ny,nz,xcoords,ycoords,zcoords,myGH->isovalue,myGH->ComputeNormals,&(myGH->perprocessor)); + NuFindSurface(data,nx,ny,nz,coords[0],coords[1],coords[2],myGH->isovalue,myGH->ComputeNormals,&(myGH->perprocessor)); /* And collect the geometry to node 0 */ CollectData(GH, &(myGH->perprocessor), &(myGH->totals)); /* and for the writers, collect min,max to node 0 */ |