diff options
author | tradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2001-06-29 13:05:56 +0000 |
---|---|---|
committer | tradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350> | 2001-06-29 13:05:56 +0000 |
commit | 0aba37b0ee16e6c7c885035b347a501d1f6b4a35 (patch) | |
tree | a75f82f6d606d29376916db2534d906e9846184a /src/Write1D.c | |
parent | 7f9e034f62fda469836c2dad6df78f100039ad72 (diff) |
In the label information, output both the physical grid coordinates and the
grid integer indices of the 1D line or 2D slice resp.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@67 94b1c47f-dcfd-45ef-a468-0854c0e9e350
Diffstat (limited to 'src/Write1D.c')
-rw-r--r-- | src/Write1D.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/Write1D.c b/src/Write1D.c index e25960a..071f7bf 100644 --- a/src/Write1D.c +++ b/src/Write1D.c @@ -398,33 +398,30 @@ void IOASCII_Write1D (cGH *GH, int vindex, const char *alias) { if (group_static_data.dim > 1) { + /* output the physical coordinates of the 1D line */ if (have_coords) { fprintf (file[i], ylabel1_fmt, 'x' + lower, coord_lower[lower] + GH->cctk_delta_space[lower] * myGH->spxyz[group_static_data.dim-1][dir][lower]); + if (group_static_data.dim > 2) + { + fprintf (file[i], ylabel2_fmt, 'x' + upper, + coord_lower[upper] + GH->cctk_delta_space[upper] * + myGH->spxyz[group_static_data.dim-1][dir][upper]); + } + fprintf (file[i], "),"); } - else - { - fprintf (file[i], " (%ci = %d", 'x' + lower, - myGH->spxyz[group_static_data.dim-1][dir][lower]); - } - } - if (group_static_data.dim > 2) - { - if (have_coords) - { - fprintf (file[i], ylabel2_fmt, 'x' + upper, - coord_lower[upper] + GH->cctk_delta_space[upper] * - myGH->spxyz[group_static_data.dim-1][dir][upper]); - } - else + /* output the index coordinates of the 1D line */ + fprintf (file[i], " (%ci = %d", 'x' + lower, + myGH->spxyz[group_static_data.dim-1][dir][lower]); + if (group_static_data.dim > 2) { fprintf (file[i], ", %ci = %d", 'x' + upper, myGH->spxyz[group_static_data.dim-1][dir][upper]); } + fprintf (file[i], ") \n"); } - fprintf (file[i], ") \n"); } } } |