diff options
author | goodale <goodale@bfcf8e34-485d-4d46-a995-1fd6fa6fb178> | 2000-10-04 09:33:52 +0000 |
---|---|---|
committer | goodale <goodale@bfcf8e34-485d-4d46-a995-1fd6fa6fb178> | 2000-10-04 09:33:52 +0000 |
commit | a56d13efe4ca5ae5ec16daf48a1842e61de89109 (patch) | |
tree | f9c3f93aeecc0cfd9ee3447675584071ad424481 /src/IsoSurfacer.c | |
parent | 26d5683ec2ee7d39c246029122ef80bcd4d63b96 (diff) |
Socket layer. Compiles but untested.
Tom
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IsoSurfacer/trunk@6 bfcf8e34-485d-4d46-a995-1fd6fa6fb178
Diffstat (limited to 'src/IsoSurfacer.c')
-rw-r--r-- | src/IsoSurfacer.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/IsoSurfacer.c b/src/IsoSurfacer.c index 8baee5e..6ad8190 100644 --- a/src/IsoSurfacer.c +++ b/src/IsoSurfacer.c @@ -532,13 +532,22 @@ void CollectData(cGH *GH, polypatch *perprocessor, polypatch *totals) { /***************************************************************************/ +int IsoWriteDataToClients(const char *metadata, + CCTK_INT8 size, + IsoType type, + CCTK_INT4 *data); + void WriteSock(cGH *GH, polypatch *totals, par_st *parms, const char *fullname, int isoindex, CCTK_REAL4 IsoValue) { -#if 0 /* Was: parms->timestep, which was callnumber from above. */ char tmpstring[128]; + CCTK_INT4 *polys; + CCTK_REAL4 *verts; + CCTK_INT4 tmppolys[3] = {0,0,0}; + CCTK_REAL4 tmpverts[3] = {0.0,0.0,0.0}; + sprintf(tmpstring," :%s[0]=%f,%u range=%f:%f", fullname,parms->isovalue, GH->cctk_iteration, @@ -546,13 +555,18 @@ void WriteSock(cGH *GH, polypatch *totals, par_st *parms, puts(tmpstring); /********Now write vertices**********/ *tmpstring='v'; - verts = totals->nverts > 0 ? totals->verts : tmpvert; - DS->sendData(tmpstring,3*totals->nverts,DataType::int2type(REMOTE_IO_FLOAT32),verts); + verts = totals->nverts > 0 ? totals->verts : tmpverts; + IsoWriteDataToClients(tmpstring, + 3*totals->nverts, + Int32, + (CCTK_INT4 *)verts); /********Now write polygons**********/ *tmpstring='c'; - polys = totals->npolys > 0 ? totals->polys : tmppoly; - DS->sendData(tmpstring,3*totals->npolys,DataType::int2type(REMOTE_IO_INT32),polys); -#endif + polys = totals->npolys > 0 ? totals->polys : tmppolys; + IsoWriteDataToClients(tmpstring, + 3*totals->npolys, + Float32, + (CCTK_INT4 *)polys); } /***************************************************************************/ |