From ad6eb67f8ab76a222cbee4af0cafe15d78804d46 Mon Sep 17 00:00:00 2001 From: allen Date: Fri, 25 Jun 1999 17:05:18 +0000 Subject: Implementing new naming convention for variables on the cGH. See cGH.h for details. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@4 ebee0441-1374-4afa-a3b5-247f3ba15b9a --- src/DumpVar.c | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'src/DumpVar.c') diff --git a/src/DumpVar.c b/src/DumpVar.c index 77325b8..dd1359a 100644 --- a/src/DumpVar.c +++ b/src/DumpVar.c @@ -546,7 +546,7 @@ void IOFlexIO_AddCommonAttributes (cGH *GH, int index, int timelevel, CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "date", BYTE, strlen (char_time_date) + 1, char_time_date)); - CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "time", FLEXIO_REAL, 1,&GH->time)); + CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "time", FLEXIO_REAL, 1,&GH->cctk_time)); /* FIXME : Origin (d3_to_IO) */ d3_to_IO [0] = 0.0; @@ -555,25 +555,25 @@ void IOFlexIO_AddCommonAttributes (cGH *GH, int index, int timelevel, CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "origin", FLEXIO_REAL,3,d3_to_IO)); CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "min_ext",FLEXIO_REAL,3,d3_to_IO)); - d3_to_IO [0] = GH->delta_space [0] * ioUtilGH->downsample_x; - d3_to_IO [1] = GH->delta_space [1] * ioUtilGH->downsample_y; - d3_to_IO [2] = GH->delta_space [2] * ioUtilGH->downsample_z; + d3_to_IO [0] = GH->cctk_delta_space [0] * ioUtilGH->downsample_x; + d3_to_IO [1] = GH->cctk_delta_space [1] * ioUtilGH->downsample_y; + d3_to_IO [2] = GH->cctk_delta_space [2] * ioUtilGH->downsample_z; CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "delta", FLEXIO_REAL, 3,d3_to_IO)); if (ioUtilGH->downsample_x > 1 || ioUtilGH->downsample_y > 1 || ioUtilGH->downsample_z > 1) { - d3_to_IO [0] = GH->delta_space [0]; - d3_to_IO [1] = GH->delta_space [1]; - d3_to_IO [2] = GH->delta_space [2]; + d3_to_IO [0] = GH->cctk_delta_space [0]; + d3_to_IO [1] = GH->cctk_delta_space [1]; + d3_to_IO [2] = GH->cctk_delta_space [2]; CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "evolution_delta", FLEXIO_REAL, 3, d3_to_IO)); } /* FIXME : Origin (d3_to_IO) */ - d3_to_IO [0] = 0.0 + gsz [0] * GH->delta_space [0] * ioUtilGH->downsample_x; - d3_to_IO [1] = 0.0 + gsz [1] * GH->delta_space [1] * ioUtilGH->downsample_y; - d3_to_IO [2] = 0.0 + gsz [2] * GH->delta_space [2] * ioUtilGH->downsample_z; + d3_to_IO [0] = 0.0 + gsz [0] * GH->cctk_delta_space [0] * ioUtilGH->downsample_x; + d3_to_IO [1] = 0.0 + gsz [1] * GH->cctk_delta_space [1] * ioUtilGH->downsample_y; + d3_to_IO [2] = 0.0 + gsz [2] * GH->cctk_delta_space [2] * ioUtilGH->downsample_z; CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "max_ext",FLEXIO_REAL,3,d3_to_IO)); CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "global_size", FLEXIO_INT4, @@ -591,7 +591,7 @@ void IOFlexIO_AddCommonAttributes (cGH *GH, int index, int timelevel, CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "unchunked", FLEXIO_INT4, 1, &i_to_IO)); - i_to_IO = GH->iteration; + i_to_IO = GH->cctk_iteration; CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "iteration", FLEXIO_INT4, 1, &i_to_IO)); } @@ -627,7 +627,7 @@ void IOFlexIO_AddChunkAttributes (cGH *GH, int index, CCTK_INT4 chunk_origin [3] CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "chunk_origin", FLEXIO_INT4, 3, chunk_origin)); - i_to_IO = GH->iteration; + i_to_IO = GH->cctk_iteration; CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "chunk_dataset", FLEXIO_INT4, 1, &i_to_IO)); @@ -724,9 +724,9 @@ void IOFlexIO_getDumpData (cGH *GH, int index, int timelevel, void **outme, } for (i = 0; i < 3; i++) { - bnd [i] = GH->lower_bound[i]; /* the bounds */ - bnd [i+3] = GH->local_shape[i]; /* the sizes */ - bnd [i+6] = GH->global_shape[i]; /* the global space */ + bnd [i] = GH->cctk_lbnd[i]; /* the bounds */ + bnd [i+3] = GH->cctk_lsh[i]; /* the sizes */ + bnd [i+6] = GH->cctk_gsh[i]; /* the global space */ } } else { @@ -735,19 +735,19 @@ void IOFlexIO_getDumpData (cGH *GH, int index, int timelevel, void **outme, int i, j, k, l; /* Downsampling code ... */ - bnd [6] = GH->global_shape[0] / ioUtilGH->downsample_x; - if (GH->global_shape[0] % ioUtilGH->downsample_x) + bnd [6] = GH->cctk_gsh[0] / ioUtilGH->downsample_x; + if (GH->cctk_gsh[0] % ioUtilGH->downsample_x) bnd [6]++; - bnd [7] = GH->global_shape[1] / ioUtilGH->downsample_y; - if (GH->global_shape[1] % ioUtilGH->downsample_y) + bnd [7] = GH->cctk_gsh[1] / ioUtilGH->downsample_y; + if (GH->cctk_gsh[1] % ioUtilGH->downsample_y) bnd [7]++; - bnd [8] = GH->global_shape[2] / ioUtilGH->downsample_z; - if (GH->global_shape[2] % ioUtilGH->downsample_z) + bnd [8] = GH->cctk_gsh[2] / ioUtilGH->downsample_z; + if (GH->cctk_gsh[2] % ioUtilGH->downsample_z) bnd [8]++; if (IO_verbose) printf ("Downsampled sizes (%d, %d, %d) -> (%d, %d, %d)\n", - GH->global_shape[0], GH->global_shape[1], GH->global_shape[2], + GH->cctk_gsh[0], GH->cctk_gsh[1], GH->cctk_gsh[2], (int) bnd [6], (int) bnd [7], (int) bnd [8]); /* Now figure out the local downsampling */ @@ -762,14 +762,14 @@ void IOFlexIO_getDumpData (cGH *GH, int index, int timelevel, void **outme, else downsample = ioUtilGH->downsample_z; - bnd [i] = GH->lower_bound[i] / downsample; + bnd [i] = GH->cctk_lbnd[i] / downsample; start [i] = bnd [i] * downsample; if (start [i] < - GH->lower_bound[i] + pughGH->ownership [PUGH_VERTEXCTR][i][0]) { + GH->cctk_lbnd[i] + pughGH->ownership [PUGH_VERTEXCTR][i][0]) { start [i] += downsample; bnd [i] ++; } - end [i] = ((GH->lower_bound [i] + + end [i] = ((GH->cctk_lbnd [i] + pughGH->ownership [PUGH_VERTEXCTR][i][1] - 1) / downsample) * downsample; bnd [i+3] = (end [i] - start [i]) / downsample + 1; @@ -786,8 +786,8 @@ void IOFlexIO_getDumpData (cGH *GH, int index, int timelevel, void **outme, /* compute local ranges */ for (i = 0; i < 3; i++) { - start [i] -= GH->lower_bound [i]; - end [i] -= GH->lower_bound [i]; + start [i] -= GH->cctk_lbnd [i]; + end [i] -= GH->cctk_lbnd [i]; } *outme = malloc (bnd [3] * bnd [4] * bnd [5] * element_size); -- cgit v1.2.3