aboutsummaryrefslogtreecommitdiff
path: root/src/IsoSurfacerInit.c
diff options
context:
space:
mode:
authorjshalf <jshalf@bfcf8e34-485d-4d46-a995-1fd6fa6fb178>2000-10-07 05:09:03 +0000
committerjshalf <jshalf@bfcf8e34-485d-4d46-a995-1fd6fa6fb178>2000-10-07 05:09:03 +0000
commite626a0effb3f657a36f2c9be6f80149814d620f3 (patch)
tree9941e00d1fe5c47c4aeb472e14256df4028ad5f2 /src/IsoSurfacerInit.c
parenta56d13efe4ca5ae5ec16daf48a1842e61de89109 (diff)
OK,
it builds... Isn't carefully tested, but at least it builds. I got rid of an awful lot of extraneous crap and in particular *all* of the static global variables. We can add crap back when its clear that it is a necessity. For some reason CCTK_INT8 was an unrecognized type in the build. You might want to add that back to the Socket.c if its clear why this type was not recognized. This only affects the subroutine IsoWriteDataToClients() git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IsoSurfacer/trunk@7 bfcf8e34-485d-4d46-a995-1fd6fa6fb178
Diffstat (limited to 'src/IsoSurfacerInit.c')
-rw-r--r--src/IsoSurfacerInit.c80
1 files changed, 18 insertions, 62 deletions
diff --git a/src/IsoSurfacerInit.c b/src/IsoSurfacerInit.c
index 3c2dcf9..c74698f 100644
--- a/src/IsoSurfacerInit.c
+++ b/src/IsoSurfacerInit.c
@@ -12,17 +12,23 @@
#include <cctk.h>
#include <cctk_Parameters.h>
-#include "IsoSurfacerGH.h"
#include "IsoSurfacerInit.h"
-isotimes_st isotimes; /* JMS: should not be a global */
-isotimes_st cdtimes;
-
/***************************************************************/
void *IsoSurfacer_SetupGH (tFleshConfig *config,
int convergence_level,
cGH *GH){
isosurfacerGH *myGH=(isosurfacerGH*)malloc(sizeof(isosurfacerGH));
+ /* initialize values */
+ myGH->funcName=0;
+ myGH->formats=0;
+ myGH->outfreq=0;
+ myGH->firstIteration=0;
+ myGH->isovalue=0.0;
+ myGH->perprocessor.verts = myGH->totals.verts = NULL;
+ myGH->perprocessor.nverts = myGH->totals.nverts = 0;
+ myGH->perprocessor.polys = myGH->totals.polys = NULL;
+ myGH->perprocessor.npolys = myGH->totals.npolys = 0;
return myGH;
}
@@ -36,7 +42,7 @@ int IsoSurfacer_InitGH (cGH *GH){
int outer_boundary_cutoff
char *outdir
*/
- int n,i;
+ int n,i;
isosurfacerGH *myGH;
myGH = (isosurfacerGH *) GH->extensions [CCTK_GHExtensionHandle ("IsoSurfacer")];
@@ -46,9 +52,13 @@ int IsoSurfacer_InitGH (cGH *GH){
myGH->formats=0;
myGH->outfreq=output_frequency;
myGH->firstIteration=output_start;
- myGH->resolution=1;
- myGH->uniq_verts=1;
myGH->isovalue=isovalue;
+ myGH->perprocessor.verts = myGH->totals.verts = NULL;
+ myGH->perprocessor.nverts = myGH->totals.nverts = 0;
+ myGH->perprocessor.polys = myGH->totals.polys = NULL;
+ myGH->perprocessor.npolys = myGH->totals.npolys = 0;
+ myGH->minval=0.0;
+ myGH->maxval=1.0;
for(i=0,n=CCTK_NumVars();i<n;i++){
char *fullname = CCTK_FullName (i);
@@ -78,8 +88,6 @@ int IsoSurfacer_InitGH (cGH *GH){
free (cmd);
}
/* otherwise, the outdir need not be created if it is '.' */
- memset(&isotimes, 0, sizeof(isotimes));
- memset(&cdtimes, 0, sizeof(cdtimes));
return 1;
}
@@ -91,61 +99,9 @@ void IsoSurfaceEnd(cGH *GH)
myGH = (isosurfacerGH *) GH->extensions [CCTK_GHExtensionHandle ("IsoSurfacer")];
if( myGH->RunIsoSurfacer == 0 )
return;
-
-#if 0
-
-
- myGH = (isosurfacerGH *) GH->extensions [CCTK_GHExtensionHandle ("IsoSurfacer")];
-
- /* Close Data Connections (If open) */
- if(myGH->datasocket) {
- CCTK_INT4 i=0;
- SendData(myGH->datasocket,"done",1,INT32,&i);
- delete static_cast<DataSender*>(myGH->datasocket);
- }
- if(myGH->commandsocket)
- delete static_cast<CommandReceiver*>(myGH->commandsocket);
-
-#endif // EXTERNAL_REMOTEIO
-
- printf("IsoSurfacer timing \n");
- printf("\n Total number of calls to the IsoSurfacer: %d\n", isotimes.ncalls);
- printf(" Time spent in IsoSurfacer:\n");
- printf(" Total real time : %.4f s\n",
- isotimes.realtime_total * 1.0 / CLK_TCK);
-#ifndef _WIN32
- printf(" Total user time : %.4f s\n",
- isotimes.tms_total.tms_utime * 1.0 / CLK_TCK);
- printf(" Total system time : %.4f s\n",
- isotimes.tms_total.tms_stime * 1.0 / CLK_TCK);
- printf(" Average real time per call : %.4f s\n",
- isotimes.realtime_total * 1.0 / CLK_TCK / isotimes.ncalls);
- printf(" Average user time per call : %.4f s\n",
- isotimes.tms_total.tms_utime * 1.0 / CLK_TCK / isotimes.ncalls);
- printf(" Average system time per call : %.4f s\n",
- isotimes.tms_total.tms_stime * 1.0 / CLK_TCK / isotimes.ncalls);
-#endif
- printf("\n Total number of calls to CollectData: %d\n", cdtimes.ncalls);
- printf(" Time spent in CollectData:\n");
- printf(" Total real time : %.4f s\n",
- cdtimes.realtime_total * 1.0 / CLK_TCK);
-#ifndef _WIN32
- printf(" Total user time : %.4f s\n",
- cdtimes.tms_total.tms_utime * 1.0 / CLK_TCK);
- printf(" Total system time : %.4f s\n",
- cdtimes.tms_total.tms_stime * 1.0 / CLK_TCK);
-#endif
- printf(" Average real time per call : %.4f s\n",
- cdtimes.realtime_total * 1.0 / CLK_TCK / cdtimes.ncalls);
-#ifndef _WIN32
- printf(" Average user time per call : %.4f s\n",
- cdtimes.tms_total.tms_utime * 1.0 / CLK_TCK / cdtimes.ncalls);
- printf(" Average system time per call : %.4f s\n",
- cdtimes.tms_total.tms_stime * 1.0 / CLK_TCK / cdtimes.ncalls);
- printf("--------------------------------------------------\n");
-#endif
}
+/* What the hell??? */
int IsoSurfacer_rfrTraverseGH (cGH *GH, int rfrpoint)
{
return 0;