00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011
00012
00013 #ifndef _AMRIO_H_
00014 #define _AMRIO_H_
00015
00016 #include "REAL.H"
00017
00018 #ifndef WRAPPER
00019 #include "LevelData.H"
00020 #include "REAL.H"
00021 #include "Vector.H"
00022 #include "FArrayBox.H"
00023 #include "IntVectSet.H"
00024 #include "RealVect.H"
00025 #include <string>
00026 #include "NamespaceHeader.H"
00027 using std::string;
00028 using std::istream;
00029 #endif
00030
00031 #ifdef CH_USE_HDF5
00033
00052 void
00053 WriteAMRHierarchyHDF5(const string& filename,
00054 const Vector<DisjointBoxLayout>& a_vectGrids,
00055 const Vector<LevelData<FArrayBox>* > & a_vectData,
00056 const Vector<string>& a_vectNames,
00057 const Box& a_domain,
00058 const Real& a_dx,
00059 const Real& a_dt,
00060 const Real& a_time,
00061 const Vector<int>& a_vectRatio,
00062 const int& a_numLevels);
00063
00065
00084 void
00085 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00086 const Vector<DisjointBoxLayout>& a_vectGrids,
00087 const Vector<LevelData<FArrayBox>* > & a_vectData,
00088 const Vector<string>& a_vectNames,
00089 const Box& a_domain,
00090 const Real& a_dx,
00091 const Real& a_dt,
00092 const Real& a_time,
00093 const Vector<int>& a_vectRatio,
00094 const int& a_numLevels);
00095
00097
00111 void
00112 WriteAMRHierarchyHDF5(const string& filename,
00113 const Vector<DisjointBoxLayout>& a_vectGrids,
00114 const Vector<LevelData<FArrayBox>* > & a_vectData,
00115 const Box& a_domain,
00116 const Vector<int>& a_vectRatio,
00117 const int& a_numLevels);
00118
00120
00134 void
00135 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00136 const Vector<DisjointBoxLayout>& a_vectGrids,
00137 const Vector<LevelData<FArrayBox>* > & a_vectData,
00138 const Box& a_domain,
00139 const Vector<int>& a_vectRatio,
00140 const int& a_numLevels);
00141
00142 #ifndef WRAPPER
00144
00170 int
00171 ReadAMRHierarchyHDF5(const string& filename,
00172 Vector<DisjointBoxLayout>& a_vectGrids,
00173 Vector<LevelData<FArrayBox>* > & a_vectData,
00174 Vector<string>& a_vectNames,
00175 Box& a_domain,
00176 Real& a_dx,
00177 Real& a_dt,
00178 Real& a_time,
00179 Vector<int>& a_refRatio,
00180 int& a_numLevels);
00181
00183
00209 int
00210 ReadAMRHierarchyHDF5(HDF5Handle& handle,
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
00244 int
00245 ReadAMRHierarchyHDF5(const string& filename,
00246 Vector<DisjointBoxLayout>& a_vectGrids,
00247 Vector<LevelData<FArrayBox>* > & a_vectData,
00248 Box& a_domain,
00249 Vector<int>& a_refRatio,
00250 int& a_numLevels);
00251
00253
00275 int
00276 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00277 Vector<DisjointBoxLayout>& a_vectGrids,
00278 Vector<LevelData<FArrayBox>* > & a_vectData,
00279 Box& a_domain,
00280 Vector<int>& a_refRatio,
00281 int& a_numLevels);
00282
00302 int
00303 ReadEBAMRASCII(const string& filename,
00304 Vector<DisjointBoxLayout>& a_vectGrids,
00305 Vector<LevelData<FArrayBox>* > & a_vectData,
00306 Vector<string>& a_vectNames,
00307 Box& a_domain,
00308 Vector<IntVectSet>& a_coveredCells,
00309 Vector<IntVectSet>& a_multiValuedCells,
00310 Vector<int>& a_refRatio,
00311 int& a_numLevels);
00312
00313 #endif
00314
00316
00322 void viewIVS(const IntVectSet* a_dataPtr, const Box* a_domain);
00323
00325
00330 void viewVectorBox(const Vector<Box>* a_dataPtr, const Box* a_domain);
00331
00332
00334
00338 void writeFAB(const FArrayBox* a_dataPtr);
00339
00341
00346 void viewFAB(const FArrayBox* a_dataPtr);
00347
00349
00351 void viewBFI(const BaseFab<int>* a_dataPtr);
00352
00354
00356 void viewBFIV(const BaseFab<IntVect>* a_dataPtr);
00357
00359
00361 void viewBFRV(const BaseFab<RealVect>* a_dataPtr);
00362
00364
00369 void browseFAB(const FArrayBox* a_dataPtr);
00370
00372
00376 void
00377 writeBFR(const BaseFab<Real>* a_dataPtr);
00378
00380
00385 void
00386 viewBFR(const BaseFab<Real>* a_dataPtr);
00387
00389
00395 void
00396 writeFABname(const FArrayBox * a_dataPtr,
00397 const char * a_filename,
00398 const Vector<string> & a_compNames = Vector<string>());
00399
00401
00408 void
00409 viewLevelNoFine(const LevelData<FArrayBox>* a_dataPtr,
00410 const LevelData<FArrayBox>* a_dataFinePtr,
00411 int a_refRatio);
00412
00414
00418 void
00419 writeLevel(const LevelData<FArrayBox>* a_dataPtr);
00420
00422
00427 void
00428 viewLevel(const LevelData<FArrayBox>* a_dataPtr);
00429
00431
00436 void
00437 browseLevel(const LevelData<FArrayBox>* a_dataPtr);
00438
00440
00446 void
00447 viewLevelNoGhost(const LevelData<FArrayBox>* a_dataPtr);
00448
00450
00454 void
00455 writeLevelname(const LevelData<FArrayBox>* a_dataPtr,
00456 const char* a_filename);
00457
00459
00463 void
00464 writeVectorLevelName(const Vector<LevelData<FArrayBox>*>* a_dataPtr,
00465 const Vector<int>* a_refRatios,
00466 const char* a_filename);
00467
00469
00474 void
00475 writeDBL(const DisjointBoxLayout* a_dataPtr);
00476
00478
00485 void
00486 viewDBL(const DisjointBoxLayout* a_dataPtr);
00487
00488 void writeCopier(const Copier* a_copier);
00489
00490 void viewCopier(const Copier* a_copier);
00491
00493
00498 void
00499 writeDBLname(const DisjointBoxLayout* a_dataPtr,
00500 const char* a_filename);
00501
00503
00522 void
00523 WritePartialAMRHierarchyHDF5(const string& filename,
00524 const Vector<DisjointBoxLayout>& a_vectGrids,
00525 const Vector<LevelData<FArrayBox>* > & a_vectData,
00526 const Vector<string>& a_vectNames,
00527 const Box& a_baseDomain,
00528 const Real& a_baseDx,
00529 const Real& a_dt,
00530 const Real& a_time,
00531 const Vector<int>& a_vectRatio,
00532 const Interval& a_levels);
00533
00534 #endif // CH_USE_HDF5
00535
00536
00537 extern void
00538 writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00539
00540
00541 extern void
00542 readAFabASCII(istream& is, FArrayBox& fab);
00543
00544 void writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00545
00546 void readAFabASCII(istream& is, FArrayBox& fab);
00547
00548
00566 void
00567 WriteAMRHierarchyASCII(const string& filename,
00568 const Vector<DisjointBoxLayout>& a_vectGrids,
00569 const Vector<LevelData<FArrayBox>* > & a_vectData,
00570 const Vector<string>& a_vectNames,
00571 const Box& a_domain,
00572 const Real& a_dx,
00573 const Real& a_dt,
00574 const Real& a_time,
00575 const Vector<int>& a_vectRatio,
00576 const int& a_numLevels);
00577
00578
00602 int
00603 ReadAMRHierarchyASCII(const string& filename,
00604 Vector<DisjointBoxLayout>& a_vectGrids,
00605 Vector<LevelData<FArrayBox>* > & a_vectData,
00606 Vector<string>& a_vectNames,
00607 Box& a_domain,
00608 Real& a_dx,
00609 Real& a_dt,
00610 Real& a_time,
00611 Vector<int>& a_vectRatio,
00612 int& a_numLevels);
00613
00614 #include "NamespaceFooter.H"
00615 #endif