aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2000-11-29 01:20:17 +0000
committertradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2000-11-29 01:20:17 +0000
commit81c567b85fa22eb167480a6a93c53fe9aa67922e (patch)
treed5699814717a1310838a75c4659e993404137886 /src
parent89577104cac652b4380ad60ef226c3b7b9fd52ab (diff)
Renamed local variable 'index' into 'vindex' to stop compiler warnings
about hiding a global routine index(3). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@58 0888f3d4-9f52-45d2-93bc-d00801ff5e46
Diffstat (limited to 'src')
-rw-r--r--src/Output.c4
-rw-r--r--src/Startup.c5
-rw-r--r--src/Write.c2
-rw-r--r--src/ioStreamedHDF5GH.h8
4 files changed, 10 insertions, 9 deletions
diff --git a/src/Output.c b/src/Output.c
index 7f1bbd5..0ce5a4e 100644
--- a/src/Output.c
+++ b/src/Output.c
@@ -189,7 +189,7 @@ int IOStreamedHDF5_TimeFor (cGH *GH,
}
/* Check this variable should be output */
- if (! (myGH->do_output[vindex] && GH->cctk_iteration % myGH->out_every == 0))
+ if (! (myGH->geo_output[vindex] && GH->cctk_iteration % myGH->out_every == 0))
{
return (0);
}
@@ -297,7 +297,7 @@ static void CheckSteerableParameters (ioStreamedHDF5GH *myGH)
times_set = CCTK_ParameterQueryTimesSet ("out_vars", CCTK_THORNSTRING);
if (times_set != out_vars_lastset)
{
- IOHDF5Util_ParseVarsForOutput (out_vars, myGH->do_output, myGH->geo_output);
+ IOHDF5Util_ParseVarsForOutput (out_vars, myGH->geo_output);
/* Save the last setting of 'out_vars' parameter */
out_vars_lastset = times_set;
diff --git a/src/Startup.c b/src/Startup.c
index b8b448c..2ba52ff 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -192,9 +192,8 @@ static void *IOStreamedHDF5_SetupGH (tFleshConfig *config,
numvars = CCTK_NumVars ();
myGH = (ioStreamedHDF5GH *) malloc (sizeof (ioStreamedHDF5GH));
- myGH->do_output = (char *) malloc (numvars * sizeof (char));
- myGH->geo_output = (ioHDF5Geo_t*) malloc (numvars * sizeof (ioHDF5Geo_t));
- myGH->out_last = (int *) malloc (numvars * sizeof (int));
+ myGH->geo_output = (ioHDF5Geo_t **) calloc (numvars, sizeof (ioHDF5Geo_t *));
+ myGH->out_last = (int *) malloc (numvars * sizeof (int));
for (i = 0; i < numvars; i++)
{
diff --git a/src/Write.c b/src/Write.c
index a75b5e0..2311a46 100644
--- a/src/Write.c
+++ b/src/Write.c
@@ -132,7 +132,7 @@ void IOStreamedHDF5_Write (cGH *GH,
}
/* output the data */
- IOHDF5Util_DumpVar (GH, vindex, timelevel, &myGH->geo_output[vindex], file, 0);
+ IOHDF5Util_DumpVar (GH, vindex, timelevel, myGH->geo_output[vindex], file, 0);
/* close the file */
if (file >= 0)
diff --git a/src/ioStreamedHDF5GH.h b/src/ioStreamedHDF5GH.h
index 852b847..2ec98f6 100644
--- a/src/ioStreamedHDF5GH.h
+++ b/src/ioStreamedHDF5GH.h
@@ -19,9 +19,11 @@ typedef struct
/* how often to output */
int out_every;
- /* flags indicating output for var [i] */
- char *do_output;
- ioHDF5Geo_t *geo_output;
+ /* array of variable output requests */
+ /* FIXME: make this a linked list of requests
+ to allow for multiple requests per variable
+ (eg. with different hyperslab parameters) */
+ ioHDF5Geo_t **geo_output;
/* the last iteration output */
int *out_last;