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 "EBFaceFAB.H"
00024 #include "EBFluxFAB.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
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
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
00070
00071
00072
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
00090
00091
00092
00093
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);
00106
00107
00108
00109
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);
00122
00123
00124 void
00125 writeEBHDF5(const string& filename,
00126 const Vector<DisjointBoxLayout>& a_vectGrids,
00127 const Vector<LevelData<EBCellFAB>* > & a_vectData,
00128 const Vector<string>& a_vectNames,
00129 const ProblemDomain& a_domain,
00130 const RealVect& a_vectDx,
00131 const Real& a_dt,
00132 const Real& a_time,
00133 const Vector<IntVect>& a_vectRatios,
00134 const int& a_numLevels,
00135 const bool& a_replaceCovered,
00136 const Vector<Real>& a_coveredValues,
00137 IntVect a_ghostVect= IntVect::Zero);
00138
00139
00140
00141
00142 void
00143 writeEBHDF5(const string& filename,
00144 const Vector<DisjointBoxLayout>& a_vectGrids,
00145 const Vector<LevelData<EBCellFAB>* > * a_phase1,
00146 const Vector<LevelData<EBCellFAB>* > * a_phase2,
00147 const Vector<LevelData<FArrayBox>* > * a_levelSet,
00148 const Vector<string>& a_vectNames,
00149 const ProblemDomain& a_domain,
00150 const RealVect& a_vectDx,
00151 const Real& a_dt,
00152 const Real& a_time,
00153 const Vector<IntVect>& a_vectRatios,
00154 const int& a_numLevels,
00155 const bool& a_replaceCovered,
00156 const Vector<Real>& a_coveredValues,
00157 IntVect a_ghostVect= IntVect::Zero);
00158
00159
00160
00161
00162
00163 void
00164 writeEBHDF5(const string& a_filename,
00165 const DisjointBoxLayout& a_grids,
00166 const LevelData<EBCellFAB>& a_data,
00167 const Vector<string>& a_vectNames,
00168 const ProblemDomain& a_domain,
00169 const RealVect& a_vectDx,
00170 const Real& a_dt,
00171 const Real& a_time,
00172 const bool& a_replaceCovered,
00173 const Vector<Real>& a_coveredValues,
00174 IntVect a_ghostVect= IntVect::Zero);
00175
00176
00177
00178
00179 void
00180 writeEBHDF5(const string& a_filename,
00181 const Box& a_grid,
00182 const EBCellFAB& a_data,
00183 const Vector<string>& a_vectNames,
00184 const ProblemDomain& a_domain,
00185 const RealVect& a_vectDx,
00186 const Real& a_dt,
00187 const Real& a_time,
00188 const bool& a_replaceCovered,
00189 const Vector<Real>& a_coveredValues,
00190 IntVect a_ghostVect= IntVect::Zero);
00191
00192
00193
00194
00195
00196
00197
00198 void
00199 writeEBFAB(const EBCellFAB* a_dataPtr);
00200
00201
00202
00203
00204
00205
00206
00207 void
00208 viewEBFAB(const EBCellFAB* a_dataPtr);
00209
00210
00211
00212
00213
00214
00215
00216
00217 void
00218 browseEBFAB(const EBCellFAB* a_dataPtr);
00219
00220
00221
00222
00223
00224
00225 void
00226 writeEBFABname(const EBCellFAB* a_dataPtr,
00227 const char* a_filename);
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237 void
00238 viewEBFluxLD(const LevelData<EBFluxFAB>* a_dataPtr, int a_dir);
00239
00240
00241
00242
00243
00244
00245
00246
00247 void writeEBFluxLDname(const LevelData<EBFluxFAB>* a_fluxLD, int a_dir,
00248 const char* a_filename);
00249
00250
00251
00252
00253
00254 void
00255 viewEBFace(const EBFaceFAB* a_dataPtr);
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265 void
00266 browseEBFace(const EBFaceFAB* a_dataPtr);
00267
00268
00269
00270
00271
00272
00273 void
00274 writeEBLevel(const LevelData<EBCellFAB>* a_dataPtr);
00275
00276
00277
00278
00279
00280
00281
00282 void
00283 viewEBLevel(const LevelData<EBCellFAB>* a_dataPtr);
00284
00285
00286
00287
00288
00289
00290
00291 void
00292 browseEBLevel(const LevelData<EBCellFAB>* a_dataPtr);
00293
00294
00295
00296
00297
00298
00299 void
00300 writeEBLevelname(const LevelData<EBCellFAB>* a_dataPtr,
00301 const char* a_filename);
00302
00303
00304
00305 void
00306 writeEBLevelName(const LevelData<EBCellFAB>& a_data,
00307 const std::string & a_filename);
00308
00309
00310
00311
00312
00313 void
00314 writeEBAMR(const Vector<LevelData<EBCellFAB>* >* a_dataPtr);
00315
00316
00317
00318
00319
00320
00321 void
00322 viewEBAMR(const Vector<LevelData<EBCellFAB>* >* a_dataPtr);
00323
00324
00325
00326
00327
00328 void
00329 visEBAMR(const Vector<LevelData<EBCellFAB>* >* a_dataPtr);
00330
00331
00332
00333
00334
00335
00336 void
00337 browseEBAMR(const Vector<LevelData<EBCellFAB>* >* a_dataPtr);
00338
00339
00340
00341
00342
00343 void
00344 writeEBAMRname(const Vector<LevelData<EBCellFAB>* >* a_dataPtr,
00345 const char* a_filename);
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356 void
00357 writeIVFAB(const BaseIVFAB<Real>* a_dataPtr);
00358
00359
00360
00361
00362
00363
00364
00365
00366 void
00367 viewIVFAB(const BaseIVFAB<Real>* a_dataPtr);
00368
00369
00370
00371
00372
00373
00374
00375
00376 void
00377 browseIVFAB(const BaseIVFAB<Real>* a_dataPtr);
00378
00379
00380
00381
00382
00383
00384 void
00385 writeIVFABname(const BaseIVFAB<Real>* a_dataPtr,
00386 const char* a_filename);
00387
00388
00389
00390
00391
00392
00393
00394 void
00395 writeIVLevel(const LevelData<BaseIVFAB<Real> >* a_dataPtr);
00396
00397
00398
00399
00400
00401
00402
00403
00404 void
00405 viewIVLevel(const LevelData<BaseIVFAB<Real> >* a_dataPtr);
00406
00407
00408
00409
00410
00411
00412
00413
00414 void
00415 browseIVLevel(const LevelData<BaseIVFAB<Real> >* a_dataPtr);
00416
00417
00418
00419
00420
00421
00422
00423 void
00424 writeIVLevelname(const LevelData<BaseIVFAB<Real> >* a_dataPtr,
00425 const char* a_filename);
00426
00427 void
00428 createEBFile(HDF5Handle& a_handle,
00429 const std::string& a_filename,
00430 int a_numLevels,
00431 const Vector<int>& a_refRatios,
00432 const ProblemDomain& a_coarseDomain,
00433 const RealVect& a_coarseDx,
00434 const IntVect& a_ghost);
00435
00436 void
00437 createEBFile(HDF5Handle& a_handle,
00438 const std::string& a_filename,
00439 int a_numLevels,
00440 const Vector<int>& a_refRatios,
00441 const ProblemDomain& a_coarseDomain,
00442 const RealVect& a_origin,
00443 const RealVect& a_coarseDx,
00444 const RealVect& a_aspect,
00445 const IntVect& a_ghost);
00446
00447 void
00448 headerEBFile(HDF5Handle& a_handle,
00449 int a_numLevels,
00450 const Vector<int>& a_refRatios,
00451 const ProblemDomain& a_coarseDomain,
00452 const RealVect& a_coarseDx,
00453 const IntVect& a_ghost);
00454
00455 void
00456 headerEBFile(HDF5Handle& a_handle,
00457 int a_numLevels,
00458 const Vector<int>& a_refRatios,
00459 const ProblemDomain& a_coarseDomain,
00460 const RealVect& a_origin,
00461 const RealVect& a_coarseDx,
00462 const RealVect& a_aspect,
00463 const IntVect& a_ghost);
00464
00465 void
00466 writeCellCenteredNames(HDF5Handle& a_handle,
00467 const Vector<std::string>& a_names);
00468 void
00469 writeNodeCenteredNames(HDF5Handle& a_handle,
00470 const Vector<std::string>& a_names);
00471
00472 void
00473 writeFaceCenteredNames(HDF5Handle& a_handle, int a_direction,
00474 const Vector<std::string>& a_names);
00475
00476
00477
00478 void
00479 writeCellCentered(HDF5Handle& a_handle,
00480 int a_level,
00481 const LevelData<EBCellFAB>* a_data,
00482 Interval interval = Interval());
00483
00484 void
00485 writeCellCentered(HDF5Handle& a_handle,
00486 int a_level,
00487 const LevelData<FArrayBox>* a_data,
00488 Interval interval = Interval());
00489
00490 void
00491 writeNodeCentered(HDF5Handle& a_handle,
00492 int a_level,
00493 const LevelData<FArrayBox>* a_data,
00494 Interval interval = Interval());
00495
00496 void
00497 writeFaceCentered(HDF5Handle& a_handle,
00498 int a_level,
00499 int a_direction,
00500 const LevelData<EBFaceFAB>* a_data,
00501 Interval interval = Interval());
00502
00503 void
00504 metaDataEBFile(HDF5Handle & a_handle,
00505 int & a_numLevels,
00506 Vector<int> & a_refRatios,
00507 ProblemDomain & a_coarseDomain,
00508 IntVect & a_ghost);
00509
00510 void
00511 readCellCentered(HDF5Handle& a_handle,
00512 int a_level,
00513 const EBIndexSpace* eb,
00514 const int ebghost,
00515 LevelData<EBCellFAB>* a_data);
00516
00517 void
00518 setWhichCellIndex(int a_whichCellIndex);
00519
00520 int
00521 getWhichCellIndex();
00522
00523 void
00524 setCoveredCellValue(Real a_coveredCellValue);
00525
00526 Real
00527 getCoveredCellValue();
00528
00529 void multiFaceValues(const EBFaceFAB* a_face,
00530 const int a_side,
00531 const int a_iv0,
00532 const int a_iv1,
00533 const int a_iv2);
00534
00535 void multiCellValues(const EBCellFAB* a_face,
00536 const int a_iv0,
00537 const int a_iv1,
00538 const int a_iv2);
00539
00540 #endif //CH_USE_HDF5
00541
00542 #include "NamespaceFooter.H"
00543 #endif