diff options
Diffstat (limited to 'src/GHExtension.c')
-rw-r--r-- | src/GHExtension.c | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c deleted file mode 100644 index b64386e..0000000 --- a/src/GHExtension.c +++ /dev/null @@ -1,84 +0,0 @@ - /*@@ - @file GHExtension.c - @date Fri May 21 1999 - @author Thomas Radke - @desc - StreamedHDF5 GH extension stuff. - @enddesc - @history - @hauthor Thomas Radke @hdate May 21 1999 - @hdesc Just copied from thorn FlexIO. - @endhistory - @@*/ - - -/*#define DEBUG_IO*/ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> - -#include "cctk.h" -#include "cctk_Parameters.h" -#include "CactusBase/IOUtil/src/ioGH.h" -#include "StreamedHDF5GH.h" - - -void *StreamedHDF5_SetupGH (tFleshConfig *config, int convergence_level, cGH *GH) -{ - int numvars; - StreamedHDF5GH *newGH; - - - numvars = CCTK_NumVars (); - - newGH = (StreamedHDF5GH *) malloc (sizeof (StreamedHDF5GH)); - newGH->do_output = (char *) malloc (numvars * sizeof (char)); - newGH->geo_output = (StreamGeo_t*) malloc (numvars * sizeof (StreamGeo_t)); - newGH->out_last = (int *) malloc (numvars * sizeof (int)); - - /* save the original error printing routine and its argument */ - CACTUS_IOHDF5_ERROR (H5Eget_auto (&newGH->printErrorFn, - &newGH->printErrorFnArg)); - - /* predefine dataspaces for writing scalar and array attributes */ - /* the dimension of the array dataspace is set when used */ - CACTUS_IOHDF5_ERROR (newGH->scalarDataspace = H5Screate (H5S_SCALAR)); - CACTUS_IOHDF5_ERROR (newGH->arrayDataspace = H5Screate (H5S_SIMPLE)); - - /* predefine a IOHDF5_COMPLEX datatype */ - CACTUS_IOHDF5_ERROR (newGH->IOHDF5_COMPLEX = - H5Tcreate (H5T_COMPOUND, sizeof (CCTK_COMPLEX))); - CACTUS_IOHDF5_ERROR (H5Tinsert (newGH->IOHDF5_COMPLEX, "real", - offsetof (CCTK_COMPLEX, Re), IOHDF5_REAL)); - CACTUS_IOHDF5_ERROR (H5Tinsert (newGH->IOHDF5_COMPLEX, "imag", - offsetof (CCTK_COMPLEX, Im), IOHDF5_REAL)); - - /* predefine a C string datatype */ - CACTUS_IOHDF5_ERROR (newGH->IOHDF5_STRING = H5Tcopy (H5T_C_S1)); - - return (newGH); -} - - -int StreamedHDF5_InitGH (cGH *GH) -{ - DECLARE_CCTK_PARAMETERS - int i; - StreamedHDF5GH *myGH; - const cParamData *paramdata; - - - myGH = (StreamedHDF5GH *) GH->extensions [CCTK_GHExtensionHandle ("StreamedHDF5")]; - - /* How often to output */ - myGH->out_every = out_every > 0 ? out_every : -1; - if (outHDF5_every > 0) - myGH->out_every = outHDF5_every; - IOUtil_ParseVarsForOutput (out_vars, myGH->do_output); - - for (i = 0; i < CCTK_NumVars (); i++) - myGH->out_last [i] = -1; - - return (0); -} |