From 88a1ab701bc9859545c57f772ab1f3582f153df2 Mon Sep 17 00:00:00 2001 From: cott <> Date: Tue, 16 Mar 2004 13:40:00 +0000 Subject: Minor polishing. darcs-hash:20040316134004-19929-58dd01e248958bcfb9f9df396d6c4122cc1c2b0e.gz --- Carpet/CarpetIOHDF5/src/iohdf5.cc | 38 ++++++++------------------------------ 1 file changed, 8 insertions(+), 30 deletions(-) (limited to 'Carpet/CarpetIOHDF5/src/iohdf5.cc') diff --git a/Carpet/CarpetIOHDF5/src/iohdf5.cc b/Carpet/CarpetIOHDF5/src/iohdf5.cc index c7b0e3f87..f8dafbb8d 100644 --- a/Carpet/CarpetIOHDF5/src/iohdf5.cc +++ b/Carpet/CarpetIOHDF5/src/iohdf5.cc @@ -17,7 +17,7 @@ #include "cctk_Parameters.h" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOHDF5/src/iohdf5.cc,v 1.19 2004/03/15 23:45:24 cott Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOHDF5/src/iohdf5.cc,v 1.20 2004/03/16 14:40:04 cott Exp $"; CCTK_FILEVERSION(Carpet_CarpetIOHDF5_iohdf5_cc); } @@ -42,8 +42,6 @@ namespace CarpetIOHDF5 { using namespace Carpet; - - // Variable definitions int GHExtension; int IOMethod; @@ -343,29 +341,8 @@ namespace CarpetIOHDF5 { const hid_t dataspace = H5Screate_simple (ldim, shape, NULL); assert (dataspace>=0); - //cout << varname << endl; - // if ( CCTK_Equals("CARPETIOASCII::next_output_iteration",varname) ) { - // const int * testdata = (int * ) tmp->storage(); - // cout << "testdata: " << ((int *)h5data)[0] << endl; - //} - -// hsize_t shape[dim]; -// for (int d=0; d=0); -// - // Select datatype -#if 0 - assert (true - || (CCTK_VarTypeI(n) == CCTK_VARIABLE_REAL8 - && sizeof(CCTK_REAL8) == sizeof(double)) - || (CCTK_VarTypeI(n) == CCTK_VARIABLE_REAL - && sizeof(CCTK_REAL) == sizeof(double))); - // TODO: Set datatype correctly -#endif + // Select datatype const hid_t datatype = h5DataType(CCTK_VarTypeI(n)); @@ -786,11 +763,12 @@ namespace CarpetIOHDF5 { ub[i]=0; } } else { - // lb[dim-1] = lb[dim-1] + (ub[dim-1]-lb[dim-1]+1)*(arrdata[group][Carpet::map].hh->processors.at(rl).at(component)); - //ub[dim-1] = ub[dim-1] + (ub[dim-1]-lb[dim-1]+1)*(arrdata[group][Carpet::map].hh->processors.at(rl).at(component)); - const int newlb = lb[gpdim-1] + (ub[gpdim-1]-lb[gpdim-1]+1)*(arrdata[group][Carpet::map].hh->processors.at(rl).at(component)); - const int newub = ub[gpdim-1] + (ub[gpdim-1]-lb[gpdim-1]+1)*(arrdata[group][Carpet::map].hh->processors.at(rl).at(component)); - cout << (ub[gpdim-1]-lb[gpdim-1]+1)*(arrdata[group][Carpet::map].hh->processors.at(rl).at(component)) << endl; + const int newlb = lb[gpdim-1] + + (ub[gpdim-1]-lb[gpdim-1]+1)* + (arrdata[group][Carpet::map].hh->processors.at(rl).at(component)); + const int newub = ub[gpdim-1] + + (ub[gpdim-1]-lb[gpdim-1]+1)* + (arrdata[group][Carpet::map].hh->processors.at(rl).at(component)); lb[gpdim-1] = newlb; ub[gpdim-1] = newub; } -- cgit v1.2.3