diff options
author | tradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2002-10-23 09:06:16 +0000 |
---|---|---|
committer | tradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2002-10-23 09:06:16 +0000 |
commit | bdc9e64dc21109384094c8281022037471080d9b (patch) | |
tree | 4fd341a866bc9184b87be27490d542a6cf08f3c6 /src/Write3D.c | |
parent | 42a74268719cc6a088feb2baf8e9ebfca7f4a526 (diff) |
Fix in outputting also the imaginary part of complex variables.
This closes PR CactusBase/1265.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@133 94b1c47f-dcfd-45ef-a468-0854c0e9e350
Diffstat (limited to 'src/Write3D.c')
-rw-r--r-- | src/Write3D.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Write3D.c b/src/Write3D.c index 8375616..5e2de18 100644 --- a/src/Write3D.c +++ b/src/Write3D.c @@ -14,6 +14,7 @@ #include "cctk.h" #include "cctk_Parameters.h" +#include "util_Table.h" #include "Hyperslab.h" #include "CactusBase/IOUtil/src/ioGH.h" #include "CactusBase/IOUtil/src/ioutil_AdvertisedFiles.h" @@ -135,7 +136,7 @@ int IOASCII_Write3D (const cGH *GH, int vindex, const char *alias) void *hdata[4]; int extent_int[3]; CCTK_REAL offset[3]; - CCTK_INT mapping; + int mapping, table; CCTK_INT vindices[4], extent[3], hsize[3]; const CCTK_INT origin[] = {0, 0, 0}, direction[] = {1, 0, 0, 0, 1, 0, 0, 0, 1}; @@ -213,15 +214,22 @@ int IOASCII_Write3D (const cGH *GH, int vindex, const char *alias) extent[i] = extent_int[i]; } + table = out_physical_boundaries ? + Util_TableCreateFromString ("with_ghostzones = 1") : -1; + /* get the hyperslab mapping */ mapping = Hyperslab_DefineGlobalMappingByIndex (GH, vindex, 3, direction, origin, extent, NULL, /* downsample */ - -1, /* table handle */ + table, NULL /* conversion fn */, hsize); + if (table >= 0) + { + Util_TableDestroy (table); + } if (mapping < 0) { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, @@ -422,7 +430,7 @@ static void WriteData (int vtype, return; } - is_complex = strncmp (CCTK_VarTypeName (vtype), "CCTK_COMPLEX", 12) == 0; + is_complex = !strncmp (CCTK_VarTypeName (vtype), "CCTK_VARIABLE_COMPLEX", 21); /* print out header */ fputs (header, file); |