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
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #ifndef _AMRIO_H_
00055 #define _AMRIO_H_
00056
00057 #include "REAL.H"
00058
00059 #ifndef WRAPPER
00060 #include "LevelData.H"
00061 #include "REAL.H"
00062 #include "Vector.H"
00063 #include "FArrayBox.H"
00064 #include "IntVectSet.H"
00065 #include <string>
00066 using std::string;
00067 using std::istream;
00068 #endif
00069
00070 #ifdef HDF5
00071
00072
00091 void
00092 WriteAMRHierarchyHDF5(const string& filename,
00093 const Vector<DisjointBoxLayout>& a_vectGrids,
00094 const Vector<LevelData<FArrayBox>* > & a_vectData,
00095 const Vector<string>& a_vectNames,
00096 const Box& a_domain,
00097 const Real& a_dx,
00098 const Real& a_dt,
00099 const Real& a_time,
00100 const Vector<int>& a_vectRatio,
00101 const int& a_numLevels);
00102
00104
00123 void
00124 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00125 const Vector<DisjointBoxLayout>& a_vectGrids,
00126 const Vector<LevelData<FArrayBox>* > & a_vectData,
00127 const Vector<string>& a_vectNames,
00128 const Box& a_domain,
00129 const Real& a_dx,
00130 const Real& a_dt,
00131 const Real& a_time,
00132 const Vector<int>& a_vectRatio,
00133 const int& a_numLevels);
00134
00136
00150 void
00151 WriteAMRHierarchyHDF5(const string& filename,
00152 const Vector<DisjointBoxLayout>& a_vectGrids,
00153 const Vector<LevelData<FArrayBox>* > & a_vectData,
00154 const Box& a_domain,
00155 const Vector<int>& a_vectRatio,
00156 const int& a_numLevels);
00157
00159
00173 void
00174 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00175 const Vector<DisjointBoxLayout>& a_vectGrids,
00176 const Vector<LevelData<FArrayBox>* > & a_vectData,
00177 const Box& a_domain,
00178 const Vector<int>& a_vectRatio,
00179 const int& a_numLevels);
00180
00181 #ifndef WRAPPER
00182
00183
00209 int
00210 ReadAMRHierarchyHDF5(const string& filename,
00211 Vector<DisjointBoxLayout>& a_vectGrids,
00212 Vector<LevelData<FArrayBox>* > & a_vectData,
00213 Vector<string>& a_vectNames,
00214 Box& a_domain,
00215 Real& a_dx,
00216 Real& a_dt,
00217 Real& a_time,
00218 Vector<int>& a_refRatio,
00219 int& a_numLevels);
00220
00222
00248 int
00249 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00250 Vector<DisjointBoxLayout>& a_vectGrids,
00251 Vector<LevelData<FArrayBox>* > & a_vectData,
00252 Vector<string>& a_vectNames,
00253 Box& a_domain,
00254 Real& a_dx,
00255 Real& a_dt,
00256 Real& a_time,
00257 Vector<int>& a_refRatio,
00258 int& a_numLevels);
00259
00261
00283 int
00284 ReadAMRHierarchyHDF5(const string& filename,
00285 Vector<DisjointBoxLayout>& a_vectGrids,
00286 Vector<LevelData<FArrayBox>* > & a_vectData,
00287 Box& a_domain,
00288 Vector<int>& a_refRatio,
00289 int& a_numLevels);
00290
00292
00314 int
00315 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00316 Vector<DisjointBoxLayout>& a_vectGrids,
00317 Vector<LevelData<FArrayBox>* > & a_vectData,
00318 Box& a_domain,
00319 Vector<int>& a_refRatio,
00320 int& a_numLevels);
00321
00341 int
00342 ReadEBAMRASCII(const string& filename,
00343 Vector<DisjointBoxLayout>& a_vectGrids,
00344 Vector<LevelData<FArrayBox>* > & a_vectData,
00345 Vector<string>& a_vectNames,
00346 Box& a_domain,
00347 Vector<IntVectSet>& a_coveredCells,
00348 Vector<IntVectSet>& a_multiValuedCells,
00349 Vector<int>& a_refRatio,
00350 int& a_numLevels);
00351
00352 #endif
00353
00355
00359 void
00360 writeFAB(const FArrayBox* a_dataPtr);
00361
00363
00368 void
00369 viewFAB(const FArrayBox* a_dataPtr);
00370
00372
00376 void
00377 writeFABname(const FArrayBox* a_dataPtr,
00378 const char* a_filename);
00379
00381
00385 void
00386 writeLevel(const LevelData<FArrayBox>* a_dataPtr);
00387
00389
00394 void
00395 viewLevel(const LevelData<FArrayBox>* a_dataPtr);
00396
00398
00404 void
00405 viewLevelNoGhost(const LevelData<FArrayBox>* a_dataPtr);
00406
00408
00412 void
00413 writeLevelname(const LevelData<FArrayBox>* a_dataPtr,
00414 const char* a_filename);
00415
00417
00422 void
00423 writeDBL(const DisjointBoxLayout* a_dataPtr);
00424
00426
00433 void
00434 viewDBL(const DisjointBoxLayout* a_dataPtr);
00435
00437
00442 void
00443 writeDBLname(const DisjointBoxLayout* a_dataPtr,
00444 const char* a_filename);
00445
00447
00466 void
00467 WritePartialAMRHierarchyHDF5(const string& filename,
00468 const Vector<DisjointBoxLayout>& a_vectGrids,
00469 const Vector<LevelData<FArrayBox>* > & a_vectData,
00470 const Vector<string>& a_vectNames,
00471 const Box& a_baseDomain,
00472 const Real& a_baseDx,
00473 const Real& a_dt,
00474 const Real& a_time,
00475 const Vector<int>& a_vectRatio,
00476 const Interval& a_levels);
00477
00478 #endif // HDF5
00479
00480
00481 extern void
00482 writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00483
00484
00485 extern void
00486 readAFabASCII(istream& is, FArrayBox& fab);
00487
00488 void writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00489
00490 void readAFabASCII(istream& is, FArrayBox& fab);
00491
00492
00510 void
00511 WriteAMRHierarchyASCII(const string& filename,
00512 const Vector<DisjointBoxLayout>& a_vectGrids,
00513 const Vector<LevelData<FArrayBox>* > & a_vectData,
00514 const Vector<string>& a_vectNames,
00515 const Box& a_domain,
00516 const Real& a_dx,
00517 const Real& a_dt,
00518 const Real& a_time,
00519 const Vector<int>& a_vectRatio,
00520 const int& a_numLevels);
00521
00522
00546 int
00547 ReadAMRHierarchyASCII(const string& filename,
00548 Vector<DisjointBoxLayout>& a_vectGrids,
00549 Vector<LevelData<FArrayBox>* > & a_vectData,
00550 Vector<string>& a_vectNames,
00551 Box& a_domain,
00552 Real& a_dx,
00553 Real& a_dt,
00554 Real& a_time,
00555 Vector<int>& a_vectRatio,
00556 int& a_numLevels);
00557
00558 #endif