diff options
-rw-r--r-- | src/GHExtension.c | 126 | ||||
-rw-r--r-- | src/make.configuration.defn | 11 |
2 files changed, 0 insertions, 137 deletions
diff --git a/src/GHExtension.c b/src/GHExtension.c deleted file mode 100644 index 5b6bf8d..0000000 --- a/src/GHExtension.c +++ /dev/null @@ -1,126 +0,0 @@ - /*@@ - @file GHExtension.c - @date Tue 9th Feb 1999 - @author Gabrielle Allen - @desc - IO GH extension stuff. - @enddesc - @history - @hauthor @hdate - @hdesc - @endhistory - @@*/ - -/*#define DEBUG_IOASCII*/ - -#include <stdlib.h> -#include <string.h> -#include <stdio.h> - -#include "cctk.h" -#include "cctk_Parameters.h" -#include "ioASCIIGH.h" - -static char *rcsid = "$Header$"; -CCTK_FILEVERSION(CactusBase_IOASCII_GHExtension_c) - - -void *IOASCII_SetupGH (tFleshConfig *config, int convergence_level, cGH *GH) -{ - asciiioGH *newGH; - int i; - - newGH = (asciiioGH *) malloc (sizeof (asciiioGH)); - newGH->do_out1D = (char *) malloc (CCTK_NumVars () * sizeof (char)); - newGH->do_out2D = (char *) malloc (CCTK_NumVars () * sizeof (char)); - newGH->out1D_last = (int *) malloc (CCTK_NumVars () * sizeof (int)); - newGH->out2D_last = (int *) malloc (CCTK_NumVars () * sizeof (int)); - newGH->spxyz = (int ***) malloc (CCTK_MaxDim() * sizeof (int **)); - newGH->sp2xyz = (int **) malloc (3 * sizeof (int *)); - for (i=0;i<CCTK_MaxDim();i++) - { - newGH->spxyz[i] = (int **) malloc (3 * sizeof (int *)); - newGH->spxyz[i][0] = (int *) malloc (3 * sizeof (int )); - newGH->spxyz[i][1] = (int *) malloc (3 * sizeof (int )); - newGH->spxyz[i][2] = (int *) malloc (3 * sizeof (int )); - - newGH->sp2xyz[i] = (int *) malloc (3 * sizeof (int )); - } - - return newGH; -} - - -int IOASCII_InitGH (cGH *GH) -{ - DECLARE_CCTK_PARAMETERS - int i; - asciiioGH *myGH; - - - /* get the handle for IOASCII extensions */ - myGH = (asciiioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOASCII")]; - - /* How often to output */ - myGH->out1D_every = out_every > 0 ? out_every : -1; - if (out1D_every > 0) - { - myGH->out1D_every = out1D_every; - } - myGH->out2D_every = out_every > 0 ? out_every : -1; - if (out2D_every > 0) - { - myGH->out2D_every = out2D_every; - } - - /* Deal with the output directories */ - /* Check whether "outdirXD" was set. - If so take this dir otherwise default to "IO::outdir" */ - myGH->outdir1D = CCTK_ParameterQueryTimesSet("outdir1D",CCTK_THORNSTRING)>0 ? - strdup (outdir1D) : strdup (outdir); - myGH->outdir2D = CCTK_ParameterQueryTimesSet("outdir2D",CCTK_THORNSTRING)>0 ? - strdup (outdir2D) : strdup (outdir); - - /* create the output dir */ - if (CCTK_MyProc (GH) == 0) - { - i = CCTK_CreateDirectory (0755, myGH->outdir1D); - if (i < 0) - { - CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "IOASCII_InitGH: Problem creating 1D output directory '%s'", - myGH->outdir1D); - } - if (i > 0) - { - CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "IOASCII_InitGH: 1D output directory '%s' already exists", - myGH->outdir1D); - } - i = CCTK_CreateDirectory (0755, myGH->outdir2D); - if (i < 0) - { - CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "IOASCII_InitGH: Problem creating 2D output directory '%s'", - myGH->outdir2D); - } - if (i > 0) - { - CCTK_VWarn (2, __LINE__, __FILE__, CCTK_THORNSTRING, - "IOASCII_InitGH: 2D output directory '%s' already exists", - myGH->outdir2D); - } - } - - for (i=0; i<CCTK_NumVars(); i++) - { - myGH->out1D_last[i] = -1; - myGH->out2D_last[i] = -1; - } - - myGH->filenameList1D = NULL; - myGH->fileList_2D = NULL; - - return 0; -} - diff --git a/src/make.configuration.defn b/src/make.configuration.defn deleted file mode 100644 index 6824bfa..0000000 --- a/src/make.configuration.defn +++ /dev/null @@ -1,11 +0,0 @@ -# make.configuration.defn for IOASCII - -# make sure that IOASCII was configured with thorn PUGHSlab - -#ifeq ($(findstring CactusPUGH/PUGHSlab,$(THORNS)),) -#.pseudo: MissingPUGHSlabInIOASCII -#MissingPUGHSlabInIOASCII: -# @echo "IOASCII: requires thorn PUGHSlab" -# @echo "IOASCII: Please add Development/PUGHSlab or remove IOASCII from Thornlist !" -# exit 2 -#endif |