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 CH_USE_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
00377 void
00378 browseFAB(const FArrayBox* a_dataPtr);
00379
00381
00385 void
00386 writeBFR(const BaseFab<Real>* a_dataPtr);
00387
00389
00394 void
00395 viewBFR(const BaseFab<Real>* a_dataPtr);
00396
00398
00404 void
00405 writeFABname(const FArrayBox * a_dataPtr,
00406 const char * a_filename,
00407 const Vector<string> & a_compNames = Vector<string>());
00408
00410
00414 void
00415 writeLevel(const LevelData<FArrayBox>* a_dataPtr);
00416
00418
00423 void
00424 viewLevel(const LevelData<FArrayBox>* a_dataPtr);
00425
00427
00433 void
00434 viewLevelNoGhost(const LevelData<FArrayBox>* a_dataPtr);
00435
00437
00441 void
00442 writeLevelname(const LevelData<FArrayBox>* a_dataPtr,
00443 const char* a_filename);
00444
00446
00451 void
00452 writeDBL(const DisjointBoxLayout* a_dataPtr);
00453
00455
00462 void
00463 viewDBL(const DisjointBoxLayout* a_dataPtr);
00464
00466
00471 void
00472 writeDBLname(const DisjointBoxLayout* a_dataPtr,
00473 const char* a_filename);
00474
00476
00495 void
00496 WritePartialAMRHierarchyHDF5(const string& filename,
00497 const Vector<DisjointBoxLayout>& a_vectGrids,
00498 const Vector<LevelData<FArrayBox>* > & a_vectData,
00499 const Vector<string>& a_vectNames,
00500 const Box& a_baseDomain,
00501 const Real& a_baseDx,
00502 const Real& a_dt,
00503 const Real& a_time,
00504 const Vector<int>& a_vectRatio,
00505 const Interval& a_levels);
00506
00507 #endif // CH_USE_HDF5
00508
00509
00510 extern void
00511 writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00512
00513
00514 extern void
00515 readAFabASCII(istream& is, FArrayBox& fab);
00516
00517 void writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00518
00519 void readAFabASCII(istream& is, FArrayBox& fab);
00520
00521
00539 void
00540 WriteAMRHierarchyASCII(const string& filename,
00541 const Vector<DisjointBoxLayout>& a_vectGrids,
00542 const Vector<LevelData<FArrayBox>* > & a_vectData,
00543 const Vector<string>& a_vectNames,
00544 const Box& a_domain,
00545 const Real& a_dx,
00546 const Real& a_dt,
00547 const Real& a_time,
00548 const Vector<int>& a_vectRatio,
00549 const int& a_numLevels);
00550
00551
00575 int
00576 ReadAMRHierarchyASCII(const string& filename,
00577 Vector<DisjointBoxLayout>& a_vectGrids,
00578 Vector<LevelData<FArrayBox>* > & a_vectData,
00579 Vector<string>& a_vectNames,
00580 Box& a_domain,
00581 Real& a_dx,
00582 Real& a_dt,
00583 Real& a_time,
00584 Vector<int>& a_vectRatio,
00585 int& a_numLevels);
00586
00587 #endif