00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _AMRIO_
00030 #define _AMRIO_
00031 #include "LevelData.H"
00032 #include "REAL.H"
00033 #include "Vector.H"
00034 #include "FArrayBox.H"
00035 #include "IntVectSet.H"
00036 #include <string>
00037 using std::string;
00038 using std::istream;
00039
00040 #ifdef HDF5
00041
00042
00061 void
00062 WriteAMRHierarchyHDF5(const string& filename,
00063 const Vector<DisjointBoxLayout>& a_vectGrids,
00064 const Vector<LevelData<FArrayBox>* > & a_vectData,
00065 const Vector<string>& a_vectNames,
00066 const Box& a_domain,
00067 const Real& a_dx,
00068 const Real& a_dt,
00069 const Real& a_time,
00070 const Vector<int>& a_vectRatio,
00071 const int& a_numLevels);
00072
00073
00075
00094 void
00095 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00096 const Vector<DisjointBoxLayout>& a_vectGrids,
00097 const Vector<LevelData<FArrayBox>* > & a_vectData,
00098 const Vector<string>& a_vectNames,
00099 const Box& a_domain,
00100 const Real& a_dx,
00101 const Real& a_dt,
00102 const Real& a_time,
00103 const Vector<int>& a_vectRatio,
00104 const int& a_numLevels);
00105
00106
00108
00122 void
00123 WriteAMRHierarchyHDF5(const string& filename,
00124 const Vector<DisjointBoxLayout>& a_vectGrids,
00125 const Vector<LevelData<FArrayBox>* > & a_vectData,
00126 const Box& a_domain,
00127 const Vector<int>& a_vectRatio,
00128 const int& a_numLevels);
00129
00130
00131
00133
00147 void
00148 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00149 const Vector<DisjointBoxLayout>& a_vectGrids,
00150 const Vector<LevelData<FArrayBox>* > & a_vectData,
00151 const Box& a_domain,
00152 const Vector<int>& a_vectRatio,
00153 const int& a_numLevels);
00154
00155
00156
00158
00184 int
00185 ReadAMRHierarchyHDF5(const string& filename,
00186 Vector<DisjointBoxLayout>& a_vectGrids,
00187 Vector<LevelData<FArrayBox>* > & a_vectData,
00188 Vector<string>& a_vectNames,
00189 Box& a_domain,
00190 Real& a_dx,
00191 Real& a_dt,
00192 Real& a_time,
00193 Vector<int>& a_refRatio,
00194 int& a_numLevels,
00195 const IntVect& a_ghostVector = IntVect::TheZeroVector());
00196
00198
00224 int
00225 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00226 Vector<DisjointBoxLayout>& a_vectGrids,
00227 Vector<LevelData<FArrayBox>* > & a_vectData,
00228 Vector<string>& a_vectNames,
00229 Box& a_domain,
00230 Real& a_dx,
00231 Real& a_dt,
00232 Real& a_time,
00233 Vector<int>& a_refRatio,
00234 int& a_numLevels,
00235 const IntVect& a_ghostVector = IntVect::TheZeroVector());
00236
00238
00260 int
00261 ReadAMRHierarchyHDF5(const string& filename,
00262 Vector<DisjointBoxLayout>& a_vectGrids,
00263 Vector<LevelData<FArrayBox>* > & a_vectData,
00264 Box& a_domain,
00265 Vector<int>& a_refRatio,
00266 int& a_numLevels,
00267 const IntVect& a_ghostVector = IntVect::TheZeroVector());
00268
00269
00271
00293 int
00294 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00295 Vector<DisjointBoxLayout>& a_vectGrids,
00296 Vector<LevelData<FArrayBox>* > & a_vectData,
00297 Box& a_domain,
00298 Vector<int>& a_refRatio,
00299 int& a_numLevels,
00300 const IntVect& a_ghostVector = IntVect::TheZeroVector());
00301
00302
00304
00308 void
00309 writeFAB(const FArrayBox* a_data);
00310
00312
00316 void
00317 writeFABname(const FArrayBox* a_data, const string& a_filename);
00318
00319
00321
00325 void
00326 writeLDF(const LevelData<FArrayBox>* a_data);
00327
00329
00333 void
00334 writeLDFname(const LevelData<FArrayBox>* a_data, const string& a_filename);
00335
00336
00337 #endif //HDF5
00338
00339
00340 extern void
00341 writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00342
00343
00344 extern void
00345 readAFabASCII(istream& is, FArrayBox& fab);
00346
00347 void writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00348
00349 void readAFabASCII(istream& is, FArrayBox& fab);
00350
00352
00369 void
00370 WriteAMRHierarchyASCII(const string& filename,
00371 const Vector<DisjointBoxLayout>& a_vectGrids,
00372 const Vector<LevelData<FArrayBox>* > & a_vectData,
00373 const Vector<string>& a_vectNames,
00374 const Box& a_domain,
00375 const Real& a_dx,
00376 const Real& a_dt,
00377 const Real& a_time,
00378 const Vector<int>& a_vectRatio,
00379 const int& a_numLevels);
00380
00381
00383
00406 int
00407 ReadAMRHierarchyASCII(const string& filename,
00408 Vector<DisjointBoxLayout>& a_vectGrids,
00409 Vector<LevelData<FArrayBox>* > & a_vectData,
00410 Vector<string>& a_vectNames,
00411 Box& a_domain,
00412 Real& a_dx,
00413 Real& a_dt,
00414 Real& a_time,
00415 Vector<int>& a_vectRatio,
00416 int& a_numLevels,
00417 const IntVect& ghostVector = IntVect::TheZeroVector());
00418
00420
00439 int
00440 ReadEBAMRASCII(const string& filename,
00441 Vector<DisjointBoxLayout>& a_vectGrids,
00442 Vector<LevelData<FArrayBox>* > & a_vectData,
00443 Vector<string>& a_vectNames,
00444 Box& a_domain,
00445 Vector<IntVectSet>& a_coveredCells,
00446 Vector<IntVectSet>& a_multiValuedCells,
00447 Vector<int>& a_refRatio,
00448 int& a_numLevels,
00449 const IntVect& a_ghostVector = IntVect::TheZeroVector());
00450
00451 #endif