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 #ifndef _PARTICLEIO_
00030 #define _PARTICLEIO_
00031 #include "REAL.H"
00032
00033 #ifndef WRAPPER
00034
00035 #include "LevelData.H"
00036 #include "REAL.H"
00037 #include "Vector.H"
00038 #include "FArrayBox.H"
00039 #include "BinFab.H"
00040 #include "BinItem.H"
00041 #include "IntVectSet.H"
00042 #include <string>
00043 using std::string;
00044 using std::istream;
00045 #endif
00046
00047 #ifdef HDF5
00048
00049
00068 void
00069 WriteAMRHierarchyHDF5(const string& filename,
00070 const Vector<DisjointBoxLayout>& a_vectGrids,
00071 const Vector<LevelData<FArrayBox>* > & a_vectData,
00072 const Vector<LevelData<BinFab<BinItem>* >* >& a_vectParticles,
00073 const Vector<string>& a_vectNames,
00074 const Box& a_domain,
00075 const Real& a_dx,
00076 const Real& a_dt,
00077 const Real& a_time,
00078 const Vector<int>& a_vectRatio,
00079 const int& a_numLevels);
00080
00081
00083
00102 void
00103 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00104 const Vector<DisjointBoxLayout>& a_vectGrids,
00105 const Vector<LevelData<FArrayBox>* > & a_vectData,
00106 const Vector<LevelData<BinFab<BinItem>* >* >& a_vectParticles,
00107 const Vector<string>& a_vectNames,
00108 const Box& a_domain,
00109 const Real& a_dx,
00110 const Real& a_dt,
00111 const Real& a_time,
00112 const Vector<int>& a_vectRatio,
00113 const int& a_numLevels);
00114
00115
00117
00131 void
00132 WriteAMRHierarchyHDF5(const string& filename,
00133 const Vector<DisjointBoxLayout>& a_vectGrids,
00134 const Vector<LevelData<FArrayBox>* > & a_vectData,
00135 const Vector<LevelData<BinFab<BinItem>* >* >& a_vectParticles,
00136 const Box& a_domain,
00137 const Vector<int>& a_vectRatio,
00138 const int& a_numLevels);
00139
00140
00141
00143
00157 void
00158 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00159 const Vector<DisjointBoxLayout>& a_vectGrids,
00160 const Vector<LevelData<FArrayBox>* > & a_vectData,
00161 const Vector<LevelData<BinFab<BinItem>* >* >& a_vectParticles,
00162 const Box& a_domain,
00163 const Vector<int>& a_vectRatio,
00164 const int& a_numLevels);
00165
00166
00167
00168
00170
00174 void
00175 writeParticleFAB(const BinFab<BinItem>* a_dataPtr);
00176
00178
00183 void
00184 viewParticleFAB(const BinFab<BinItem>* a_dataPtr);
00185
00187
00191 void
00192 writeParticleFABname(const BinFab<BinItem>* a_dataPtr,
00193 const char* a_filename);
00194
00195
00197
00201 void
00202 writeParticleLevel(const LevelData<BinFab<BinItem> >* a_dataPtr);
00203
00205
00210 void
00211 viewParticleLevel(const LevelData<BinFab<BinItem> >* a_dataPtr);
00212
00214
00220 void
00221 viewParticleLevelNoGhost(const LevelData<BinFab<BinItem> >* a_dataPtr);
00222
00223
00225
00229 void
00230 writeParticleLevelname(const LevelData<BinFab<BinItem> >* a_dataPtr,
00231 const char* a_filename);
00232
00234
00253 void
00254 WritePartialAMRHierarchyHDF5(const string& filename,
00255 const Vector<DisjointBoxLayout>& a_vectGrids,
00256 const Vector<LevelData<FArrayBox>* > & a_vectData,
00257 const Vector<LevelData<BinFab<BinItem>* >* >& a_vectParticles,
00258 const Vector<string>& a_vectNames,
00259 const Box& a_baseDomain,
00260 const Real& a_baseDx,
00261 const Real& a_dt,
00262 const Real& a_time,
00263 const Vector<int>& a_vectRatio,
00264 const Interval& a_levels);
00265
00266
00267
00268
00270 int
00271 writeParticlesHDF5(HDF5Handle& a_handle,
00272 const List<BinItem>& a_particleList);
00273
00274
00276 int WriteHDFVectorChunk( hid_t a_gid ,std::vector<Real> const & a_vdata,
00277 hid_t a_dataset, hid_t a_dataspace,
00278 size_t & a_offset );
00279
00280
00281 #endif // HDF5
00282
00283
00284 extern void
00285 writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00286
00287
00288 void writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00289
00290
00291
00309 void
00310 WriteAMRHierarchyASCII(const string& filename,
00311 const Vector<DisjointBoxLayout>& a_vectGrids,
00312 const Vector<LevelData<FArrayBox>* > & a_vectData,
00313 const Vector<LevelData<BinFab<BinItem>* >* >& a_vectParticles,
00314 const Vector<string>& a_vectNames,
00315 const Box& a_domain,
00316 const Real& a_dx,
00317 const Real& a_dt,
00318 const Real& a_time,
00319 const Vector<int>& a_vectRatio,
00320 const int& a_numLevels);
00321
00322
00323
00324
00326 int
00327 incrementParticleList(List<BinItem>& a_particleList,
00328 const BaseFab<BinItem>& a_binFab);
00329
00330
00331 #endif // multiple-include preventer