Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

AMRIO.H

Go to the documentation of this file.
00001 /* _______              __
00002   / ___/ /  ___  __ _  / /  ___
00003  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004  \___/_//_/\___/_/_/_/_.__/\___/ 
00005 */
00006 //
00007 // This software is copyright (C) by the Lawrence Berkeley
00008 // National Laboratory.  Permission is granted to reproduce
00009 // this software for non-commercial purposes provided that
00010 // this notice is left intact.
00011 // 
00012 // It is acknowledged that the U.S. Government has rights to
00013 // this software under Contract DE-AC03-765F00098 between
00014 // the U.S.  Department of Energy and the University of
00015 // California.
00016 //
00017 // This software is provided as a professional and academic
00018 // contribution for joint exchange. Thus it is experimental,
00019 // is provided ``as is'', with no warranties of any kind
00020 // whatsoever, no support, no promise of updates, or printed
00021 // documentation. By using this software, you acknowledge
00022 // that the Lawrence Berkeley National Laboratory and
00023 // Regents of the University of California shall have no
00024 // liability with respect to the infringement of other
00025 // copyrights by any part of this software.
00026 //
00027 // DTGraves, Fri, Dec 3, 1999
00028 
00029 #ifndef _AMRIO_
00030 #define _AMRIO_
00031 #include "REAL.H"
00032 #ifndef WRAPPER
00033 
00034 #include "LevelData.H"
00035 #include "REAL.H"
00036 #include "Vector.H"
00037 #include "FArrayBox.H"
00038 #include "IntVectSet.H"
00039 #include <string>
00040 #include "LDF.H"
00041 using std::string;
00042 using std::istream;
00043 #endif
00044 
00045 class AMRData 
00046 {
00047 public:
00048   AMRData(){ numLevels = 0; dx=0.0; dt=0.0; time=0.0; ghost=ZeroVector();}
00049   Vector< DisjointBoxLayout > vectGrids;  
00050   Vector< LDF >  vectData;  
00051   Vector< string > vectNames; 
00052   Box domain;  
00053   Real dx;  
00054   Real dt;  
00055   Real time; 
00056   Vector< int > vectRatio;   
00057   int numLevels;
00058   IntVect ghost;
00059 };
00060 
00062 
00081 void WriteAMRHierarchyHDF5(string filename,  const AMRData& data);
00083 
00102 void
00103 WriteAMRHierarchyHDF5(const string& filename,                             
00104                       const Vector<DisjointBoxLayout>& a_vectGrids, 
00105                       const Vector<LevelData<FArrayBox>* > & a_vectData, 
00106                       const Vector<string>& a_vectNames,                 
00107                       const Box& a_domain,                               
00108                       const Real& a_dx,                                         
00109                       const Real& a_dt,                                         
00110                       const Real& a_time,
00111                       const Vector<int>& a_vectRatio,                           
00112                       const int& a_numLevels);
00113 
00114 
00116 
00135 void
00136 WriteAMRHierarchyHDF5(HDF5Handle& handle,                             
00137                       const Vector<DisjointBoxLayout>& a_vectGrids, 
00138                       const Vector<LevelData<FArrayBox>* > & a_vectData, 
00139                       const Vector<string>& a_vectNames,                 
00140                       const Box& a_domain,                               
00141                       const Real& a_dx,                                         
00142                       const Real& a_dt,                                         
00143                       const Real& a_time,
00144                       const Vector<int>& a_vectRatio,                           
00145                       const int& a_numLevels);
00146 
00147 
00149 
00163 void
00164 WriteAMRHierarchyHDF5(const string& filename,                             
00165                       const Vector<DisjointBoxLayout>& a_vectGrids, 
00166                       const Vector<LevelData<FArrayBox>* > & a_vectData, 
00167                       const Box& a_domain,                               
00168                       const Vector<int>& a_vectRatio,                           
00169                       const int& a_numLevels);
00170 
00171 
00172 
00174 
00188 void
00189 WriteAMRHierarchyHDF5(HDF5Handle& handle, 
00190                       const Vector<DisjointBoxLayout>& a_vectGrids, 
00191                       const Vector<LevelData<FArrayBox>* > & a_vectData, 
00192                       const Box& a_domain,                               
00193                       const Vector<int>& a_vectRatio,                           
00194                       const int& a_numLevels);
00195 
00196 
00198 
00225 int
00226 ReadAMRHierarchyHDF5(string filename,  AMRData& data);
00227 
00228 #ifndef WRAPPER
00229 
00230 
00256 int
00257 ReadAMRHierarchyHDF5(const string& filename,                             
00258                      Vector<DisjointBoxLayout>& a_vectGrids, 
00259                      Vector<LevelData<FArrayBox>* > & a_vectData, 
00260                      Vector<string>& a_vectNames,                 
00261                      Box& a_domain,                               
00262                      Real& a_dx,                                         
00263                      Real& a_dt,                                         
00264                      Real& a_time,                                         
00265                      Vector<int>& a_refRatio,                           
00266                      int& a_numLevels,
00267                      const IntVect& a_ghostVector = IntVect::TheZeroVector());
00268 
00270 
00296 int
00297 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00298                      Vector<DisjointBoxLayout>& a_vectGrids, 
00299                      Vector<LevelData<FArrayBox>* > & a_vectData, 
00300                      Vector<string>& a_vectNames,                 
00301                      Box& a_domain,                               
00302                      Real& a_dx,                                         
00303                      Real& a_dt,                                         
00304                      Real& a_time,                                         
00305                      Vector<int>& a_refRatio,                           
00306                      int& a_numLevels,
00307                      const IntVect& a_ghostVector = IntVect::TheZeroVector());
00308 
00310 
00332 int
00333 ReadAMRHierarchyHDF5(const string& filename,                             
00334                      Vector<DisjointBoxLayout>& a_vectGrids, 
00335                      Vector<LevelData<FArrayBox>* > & a_vectData, 
00336                      Box& a_domain,                               
00337                      Vector<int>& a_refRatio,                           
00338                      int& a_numLevels,
00339                      const IntVect& a_ghostVector = IntVect::TheZeroVector());
00340 
00341 
00343 
00365 int
00366 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00367                      Vector<DisjointBoxLayout>& a_vectGrids, 
00368                      Vector<LevelData<FArrayBox>* > & a_vectData, 
00369                      Box& a_domain,                               
00370                      Vector<int>& a_refRatio,                           
00371                      int& a_numLevels,
00372                      const IntVect& a_ghostVector = IntVect::TheZeroVector());
00373 // ///
00393  int
00394  ReadEBAMRASCII(const string& filename,                             
00395                 Vector<DisjointBoxLayout>& a_vectGrids, 
00396                 Vector<LevelData<FArrayBox>* > & a_vectData, 
00397                 Vector<string>& a_vectNames,                 
00398                 Box& a_domain,                               
00399                 Vector<IntVectSet>& a_coveredCells,                               
00400                Vector<IntVectSet>& a_multiValuedCells,                               
00401                Vector<int>& a_refRatio,                           
00402                int& a_numLevels,
00403                const IntVect& a_ghostVector = IntVect::TheZeroVector());
00404 
00405 #endif
00406 
00408 
00412 void
00413 writeFAB(const FArrayBox* a_dataPtr);
00414 
00416 
00421 void
00422 viewFAB(const FArrayBox* a_dataPtr);
00423 
00425 
00429 void
00430 writeFABname(const FArrayBox* a_dataPtr,
00431              const char*      a_filename);
00432 
00434 
00438 void
00439 writeLDF(const LDF* a_dataPtr);
00440 
00442 
00446 void
00447 writeLevel(const LevelData<FArrayBox>* a_dataPtr);
00448 
00450 
00455 void
00456 viewLevel(const LevelData<FArrayBox>* a_dataPtr);
00457 
00459 
00463 void
00464 writeLDFname(const LDF*    a_dataPtr,
00465              const string& a_filename);
00466 
00468 
00472 void
00473 writeLevelname(const LevelData<FArrayBox>* a_dataPtr,
00474                const char*                 a_filename);
00475 
00477 
00496 void
00497 WritePartialAMRHierarchyHDF5(const string& filename,
00498                              const Vector<DisjointBoxLayout>& a_vectGrids, 
00499                              const Vector<LevelData<FArrayBox>* > & a_vectData,
00500                              const Vector<string>& a_vectNames,
00501                              const Box& a_baseDomain,
00502                              const Real& a_baseDx,
00503                              const Real& a_dt,
00504                              const Real& a_time,
00505                              const Vector<int>& a_vectRatio,
00506                              const Interval& a_levels);
00507 
00508 
00509 
00510 
00511 
00512 // //write a fab out in ascii very slowly
00513  extern void 
00514  writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00515 
00516 // //read a  fab in, in ascii, very slowly
00517  extern void 
00518  readAFabASCII(istream& is, FArrayBox& fab);
00519 
00520  void writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00521 
00522  void readAFabASCII(istream& is, FArrayBox& fab);
00523 
00524 // ///
00542  void
00543 WriteAMRHierarchyASCII(const string& filename,                             
00544                        const Vector<DisjointBoxLayout>& a_vectGrids, 
00545                        const Vector<LevelData<FArrayBox>* > & a_vectData, 
00546                        const Vector<string>& a_vectNames,                 
00547                        const Box& a_domain,                               
00548                        const Real& a_dx,
00549                        const Real& a_dt,
00550                        const Real& a_time,
00551                        const Vector<int>& a_vectRatio,
00552                        const int& a_numLevels);
00553 
00554 
00555 // ///
00579 int
00580 ReadAMRHierarchyASCII(const string& filename,                             
00581                       Vector<DisjointBoxLayout>& a_vectGrids, 
00582                       Vector<LevelData<FArrayBox>* > & a_vectData, 
00583                       Vector<string>& a_vectNames,                 
00584                       Box& a_domain,                               
00585                       Real& a_dx,                                         
00586                       Real& a_dt,                                         
00587                       Real& a_time,                                         
00588                       Vector<int>& a_vectRatio,                           
00589                       int& a_numLevels,
00590                       const IntVect& ghostVector = IntVect::TheZeroVector());
00591 
00592 #endif

Generated on Wed Apr 16 14:31:03 2003 for EBChombo by doxygen1.2.16