diff options
author | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2002-03-05 10:46:17 +0000 |
---|---|---|
committer | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2002-03-05 10:46:17 +0000 |
commit | ae647cb52875b6839014898098098551c0f3f8f9 (patch) | |
tree | 869071e20c7a268dfcfe02231abdc54119b93d0a | |
parent | 2341ee08368309d7a45c9be401b50e75f95de4f0 (diff) |
For checkpoint files, save all parameters (not just the ones which have been
set before).
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@227 ebee0441-1374-4afa-a3b5-247f3ba15b9a
-rw-r--r-- | src/DumpGH.c | 20 | ||||
-rw-r--r-- | src/Write3D.c | 7 |
2 files changed, 16 insertions, 11 deletions
diff --git a/src/DumpGH.c b/src/DumpGH.c index bacad8a..bfd8b77 100644 --- a/src/DumpGH.c +++ b/src/DumpGH.c @@ -34,7 +34,7 @@ CCTK_FILEVERSION(CactusPUGHIO_IOFlexIO_DumpGH_c) void IOFlexIO_ConditionallyDumpGH (cGH *GH); void IOFlexIO_TerminationDumpGH (cGH *GH); void IOFlexIO_InitialDataDumpGH (cGH *GH); -void IOFlexIOi_DumpParameters (const cGH *GH, IOFile iof); +void IOFlexIOi_DumpParameters (const cGH *GH, int all, IOFile iof); void IOFlexIOi_DumpGHExtensions (const cGH *GH, IOFile iof); @@ -178,18 +178,24 @@ void IOFlexIO_InitialDataDumpGH (cGH *GH) @vtype const cGH * @vio in @endvar + @var all + @vdesc flag indicating whether to save all parameters or just the ones + which have been set before + @vtype int + @vio in + @endvar @var iof @vdesc the IEEEIO file where to dump the parameters to @vtype IOFile @vio in @endvar @@*/ -void IOFlexIOi_DumpParameters (const cGH *GH, IOFile iof) +void IOFlexIOi_DumpParameters (const cGH *GH, int all, IOFile iof) { char *parameters; - parameters = IOUtil_GetAllParameters (GH); + parameters = IOUtil_GetAllParameters (GH, all); if (parameters) { CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, GLOBAL_PARAMETERS, FLEXIO_CHAR, @@ -369,11 +375,9 @@ void IOFlexIO_DumpGH (const cGH *GH, int called_from) /* first the parameters ... */ if (iof) { - if (out3D_parameters) { - if (verbose) - CCTK_INFO ("Dumping Params ..."); - IOFlexIOi_DumpParameters (GH, iof); - } + if (verbose) + CCTK_INFO ("Dumping Params ..."); + IOFlexIOi_DumpParameters (GH, 1, iof); IOFlexIOi_DumpGHExtensions (GH, iof); } diff --git a/src/Write3D.c b/src/Write3D.c index b5cb906..0a6ab76 100644 --- a/src/Write3D.c +++ b/src/Write3D.c @@ -49,7 +49,7 @@ CCTK_FILEVERSION(CactusPUGHIO_IOFlexIO_Write3D_c) /* Function prototypes from other files in this thorn */ void IOFlexIOi_DumpGHExtensions (const cGH *GH, IOFile iof); -void IOFlexIOi_DumpParameters (const cGH *GH, IOFile iof); +void IOFlexIOi_DumpParameters (const cGH *GH, int all, IOFile iof); @@ -230,8 +230,9 @@ int IOFlexIO_Write3D (const cGH *GH, int vindex, const char *alias) if (isNewFile) { IOFlexIOi_DumpGHExtensions (GH, IEEEfile_3D->iofile); - if (out3D_parameters) - IOFlexIOi_DumpParameters (GH, IEEEfile_3D->iofile); + if (strcmp (out3D_parameters, "no")) + IOFlexIOi_DumpParameters (GH, strcmp (out3D_parameters, "all") == 0, + IEEEfile_3D->iofile); } /* close the file */ |