00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011
00012
00013 #ifndef _EBAMRIO_H_
00014 #define _EBAMRIO_H_
00015
00016 #include "LevelData.H"
00017 #include "REAL.H"
00018 #include "Vector.H"
00019 #include "EBCellFAB.H"
00020 #include "IntVectSet.H"
00021 #include "EBISBox.H"
00022 #include "EBISLayout.H"
00023 #include "EBCellFAB.H"
00024 #include "EBFaceFAB.H"
00025 #include <string>
00026 #include "NamespaceHeader.H"
00027 class EBIndexSpace;
00028
00029 using std::string;
00030 using std::istream;
00031
00032 #ifdef CH_USE_HDF5
00034
00055 void
00056 writeEBHDF5(const string& filename,
00057 const Vector<DisjointBoxLayout>& a_vectGrids,
00058 const Vector<LevelData<EBCellFAB>* > & a_vectData,
00059 const Vector<string>& a_vectNames,
00060 const ProblemDomain& a_domain,
00061 const Real& a_dx,
00062 const Real& a_dt,
00063 const Real& a_time,
00064 const Vector<int>& a_vectRatio,
00065 const int& a_numLevels,
00066 const bool& a_replaceCovered,
00067 const Vector<Real>& a_coveredValues,
00068 IntVect a_ghostVect= IntVect::Zero);
00069
00073 void
00074 writeEBHDF5(const string& filename,
00075 const Vector<DisjointBoxLayout>& a_vectGrids,
00076 const Vector<LevelData<EBCellFAB>* > * a_phase1,
00077 const Vector<LevelData<EBCellFAB>* > * a_phase2,
00078 const Vector<LevelData<FArrayBox>* > * a_levelSet,
00079 const Vector<string>& a_vectNames,
00080 const ProblemDomain& a_domain,
00081 const Real& a_dx,
00082 const Real& a_dt,
00083 const Real& a_time,
00084 const Vector<int>& a_vectRatio,
00085 const int& a_numLevels,
00086 const bool& a_replaceCovered,
00087 const Vector<Real>& a_coveredValues,
00088 IntVect a_ghostVect= IntVect::Zero);
00089
00091
00094 void
00095 writeEBHDF5(const string& a_filename,
00096 const DisjointBoxLayout& a_grids,
00097 const LevelData<EBCellFAB>& a_data,
00098 const Vector<string>& a_vectNames,
00099 const ProblemDomain& a_domain,
00100 const Real& a_dx,
00101 const Real& a_dt,
00102 const Real& a_time,
00103 const bool& a_replaceCovered,
00104 const Vector<Real>& a_coveredValues,
00105 IntVect a_ghostVect= IntVect::Zero);
00107
00110 void
00111 writeEBHDF5(const string& a_filename,
00112 const Box& a_grid,
00113 const EBCellFAB& a_data,
00114 const Vector<string>& a_vectNames,
00115 const ProblemDomain& a_domain,
00116 const Real& a_dx,
00117 const Real& a_dt,
00118 const Real& a_time,
00119 const bool& a_replaceCovered,
00120 const Vector<Real>& a_coveredValues,
00121 IntVect a_ghostVect= IntVect::Zero);
00123
00127 void
00128 writeEBFAB(const EBCellFAB* a_dataPtr);
00129
00131
00136 void
00137 viewEBFAB(const EBCellFAB* a_dataPtr);
00138
00139
00141
00146 void
00147 browseEBFAB(const EBCellFAB* a_dataPtr);
00148
00150
00154 void
00155 writeEBFABname(const EBCellFAB* a_dataPtr,
00156 const char* a_filename);
00157
00159
00165 void
00166 viewEBFace(const EBFaceFAB* a_dataPtr);
00167
00168
00170
00176 void
00177 browseEBFace(const EBFaceFAB* a_dataPtr);
00178
00180
00184 void
00185 writeEBLevel(const LevelData<EBCellFAB>* a_dataPtr);
00186
00188
00193 void
00194 viewEBLevel(const LevelData<EBCellFAB>* a_dataPtr);
00195
00197
00202 void
00203 browseEBLevel(const LevelData<EBCellFAB>* a_dataPtr);
00204
00206
00210 void
00211 writeEBLevelname(const LevelData<EBCellFAB>* a_dataPtr,
00212 const char* a_filename);
00213
00215
00218 void
00219 writeEBAMR(const Vector<LevelData<EBCellFAB>* >* a_dataPtr);
00220
00222
00226 void
00227 viewEBAMR(const Vector<LevelData<EBCellFAB>* >* a_dataPtr);
00228
00230
00233 void
00234 visEBAMR(const Vector<LevelData<EBCellFAB>* >* a_dataPtr);
00235
00237
00241 void
00242 browseEBAMR(const Vector<LevelData<EBCellFAB>* >* a_dataPtr);
00243
00245
00248 void
00249 writeEBAMRname(const Vector<LevelData<EBCellFAB>* >* a_dataPtr,
00250 const char* a_filename);
00251
00252
00254
00261 void
00262 writeIVFAB(const BaseIVFAB<Real>* a_dataPtr);
00263
00265
00271 void
00272 viewIVFAB(const BaseIVFAB<Real>* a_dataPtr);
00273
00274
00276
00281 void
00282 browseIVFAB(const BaseIVFAB<Real>* a_dataPtr);
00283
00285
00289 void
00290 writeIVFABname(const BaseIVFAB<Real>* a_dataPtr,
00291 const char* a_filename);
00292
00293
00295
00299 void
00300 writeIVLevel(const LevelData<BaseIVFAB<Real> >* a_dataPtr);
00301
00303
00309 void
00310 viewIVLevel(const LevelData<BaseIVFAB<Real> >* a_dataPtr);
00311
00313
00319 void
00320 browseIVLevel(const LevelData<BaseIVFAB<Real> >* a_dataPtr);
00321
00323
00328 void
00329 writeIVLevelname(const LevelData<BaseIVFAB<Real> >* a_dataPtr,
00330 const char* a_filename);
00331
00332 void
00333 createEBFile(HDF5Handle& a_handle,
00334 const std::string& a_filename,
00335 int a_numLevels,
00336 const Vector<int>& a_refRatios,
00337 const ProblemDomain& a_coarseDomain,
00338 const RealVect& a_coarseDx,
00339 const IntVect& a_ghost);
00340
00341 void
00342 headerEBFile(HDF5Handle& a_handle,
00343 int a_numLevels,
00344 const Vector<int>& a_refRatios,
00345 const ProblemDomain& a_coarseDomain,
00346 const RealVect& a_coarseDx,
00347 const IntVect& a_ghost);
00348
00349 void
00350 writeCellCenteredNames(HDF5Handle& a_handle,
00351 const Vector<std::string>& a_names);
00352 void
00353 writeNodeCenteredNames(HDF5Handle& a_handle,
00354 const Vector<std::string>& a_names);
00355
00356 void
00357 writeFaceCenteredNames(HDF5Handle& a_handle, int a_direction,
00358 const Vector<std::string>& a_names);
00359
00361
00362 void
00363 writeCellCentered(HDF5Handle& a_handle,
00364 int a_level,
00365 const LevelData<EBCellFAB>* a_data,
00366 Interval interval = Interval());
00367
00368 void
00369 writeCellCentered(HDF5Handle& a_handle,
00370 int a_level,
00371 const LevelData<FArrayBox>* a_data,
00372 Interval interval = Interval());
00373
00374 void
00375 writeNodeCentered(HDF5Handle& a_handle,
00376 int a_level,
00377 const LevelData<FArrayBox>* a_data,
00378 Interval interval = Interval());
00379
00380 void
00381 writeFaceCentered(HDF5Handle& a_handle,
00382 int a_level,
00383 int a_direction,
00384 const LevelData<EBFaceFAB>* a_data,
00385 Interval interval = Interval());
00386
00387 void
00388 readCellCentered(HDF5Handle& a_handle,
00389 int a_level,
00390 const EBIndexSpace* eb,
00391 const int ebghost,
00392 LevelData<EBCellFAB>* a_data);
00393
00394 void
00395 setWhichCellIndex(int a_whichCellIndex);
00396
00397 int
00398 getWhichCellIndex();
00399
00400 void
00401 setCoveredCellValue(Real a_coveredCellValue);
00402
00403 Real
00404 getCoveredCellValue();
00405
00406 void multiFaceValues(const EBFaceFAB* a_face,
00407 const int a_side,
00408 const int a_iv0,
00409 const int a_iv1,
00410 const int a_iv2);
00411
00412 void multiCellValues(const EBCellFAB* a_face,
00413 const int a_iv0,
00414 const int a_iv1,
00415 const int a_iv2);
00416
00417 #endif //CH_USE_HDF5
00418
00419 #include "NamespaceFooter.H"
00420 #endif