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    / /__/ _ \/ _ \/  V \/ _ \/ _ \
00004    \___/_//_/\___/_/_/_/_.__/\___/
00005 */
00006 // CHOMBO Copyright (c) 2000-2004, The Regents of the University of
00007 // California, through Lawrence Berkeley National Laboratory (subject to
00008 // receipt of any required approvals from U.S. Dept. of Energy).  All
00009 // rights reserved.
00010 //
00011 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are met:
00013 //
00014 // (1) Redistributions of source code must retain the above copyright
00015 // notice, this list of conditions and the following disclaimer.
00016 // (2) Redistributions in binary form must reproduce the above copyright
00017 // notice, this list of conditions and the following disclaimer in the
00018 // documentation and/or other materials provided with the distribution.
00019 // (3) Neither the name of Lawrence Berkeley National Laboratory, U.S.
00020 // Dept. of Energy nor the names of its contributors may be used to endorse
00021 // or promote products derived from this software without specific prior
00022 // written permission.
00023 //
00024 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00025 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
00026 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
00027 // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
00028 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00029 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00030 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00031 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00032 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00033 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00034 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00035 //
00036 // You are under no obligation whatsoever to provide any bug fixes,
00037 // patches, or upgrades to the features, functionality or performance of
00038 // the source code ("Enhancements") to anyone; however, if you choose to
00039 // make your Enhancements available either publicly, or directly to
00040 // Lawrence Berkeley National Laboratory, without imposing a separate
00041 // written license agreement for such Enhancements, then you hereby grant
00042 // the following license: a non-exclusive, royalty-free perpetual license
00043 // to install, use, modify, prepare derivative works, incorporate into
00044 // other computer software, distribute, and sublicense such Enhancements or
00045 // derivative works thereof, in binary and source code form.
00046 //
00047 // TRADEMARKS. Product and company names mentioned herein may be the
00048 // trademarks of their respective owners.  Any rights not expressly granted
00049 // herein are reserved.
00050 //
00051 
00052 // DTGraves, Fri, Dec 3, 1999
00053 
00054 #ifndef _AMRIO_H_
00055 #define _AMRIO_H_
00056 
00057 #include "REAL.H"
00058 
00059 #ifndef WRAPPER
00060 #include "LevelData.H"
00061 #include "REAL.H"
00062 #include "Vector.H"
00063 #include "FArrayBox.H"
00064 #include "IntVectSet.H"
00065 #include <string>
00066 using std::string;
00067 using std::istream;
00068 #endif
00069 
00070 #ifdef HDF5
00071 
00072 
00091 void
00092 WriteAMRHierarchyHDF5(const string& filename,
00093                       const Vector<DisjointBoxLayout>& a_vectGrids,
00094                       const Vector<LevelData<FArrayBox>* > & a_vectData,
00095                       const Vector<string>& a_vectNames,
00096                       const Box& a_domain,
00097                       const Real& a_dx,
00098                       const Real& a_dt,
00099                       const Real& a_time,
00100                       const Vector<int>& a_vectRatio,
00101                       const int& a_numLevels);
00102 
00104 
00123 void
00124 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00125                       const Vector<DisjointBoxLayout>& a_vectGrids,
00126                       const Vector<LevelData<FArrayBox>* > & a_vectData,
00127                       const Vector<string>& a_vectNames,
00128                       const Box& a_domain,
00129                       const Real& a_dx,
00130                       const Real& a_dt,
00131                       const Real& a_time,
00132                       const Vector<int>& a_vectRatio,
00133                       const int& a_numLevels);
00134 
00136 
00150 void
00151 WriteAMRHierarchyHDF5(const string& filename,
00152                       const Vector<DisjointBoxLayout>& a_vectGrids,
00153                       const Vector<LevelData<FArrayBox>* > & a_vectData,
00154                       const Box& a_domain,
00155                       const Vector<int>& a_vectRatio,
00156                       const int& a_numLevels);
00157 
00159 
00173 void
00174 WriteAMRHierarchyHDF5(HDF5Handle& handle,
00175                       const Vector<DisjointBoxLayout>& a_vectGrids,
00176                       const Vector<LevelData<FArrayBox>* > & a_vectData,
00177                       const Box& a_domain,
00178                       const Vector<int>& a_vectRatio,
00179                       const int& a_numLevels);
00180 
00181 #ifndef WRAPPER
00182 
00183 
00209 int
00210 ReadAMRHierarchyHDF5(const string& filename,
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 
00248 int
00249 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00250                      Vector<DisjointBoxLayout>& a_vectGrids,
00251                      Vector<LevelData<FArrayBox>* > & a_vectData,
00252                      Vector<string>& a_vectNames,
00253                      Box& a_domain,
00254                      Real& a_dx,
00255                      Real& a_dt,
00256                      Real& a_time,
00257                      Vector<int>& a_refRatio,
00258                      int& a_numLevels);
00259 
00261 
00283 int
00284 ReadAMRHierarchyHDF5(const string& filename,
00285                      Vector<DisjointBoxLayout>& a_vectGrids,
00286                      Vector<LevelData<FArrayBox>* > & a_vectData,
00287                      Box& a_domain,
00288                      Vector<int>& a_refRatio,
00289                      int& a_numLevels);
00290 
00292 
00314 int
00315 ReadAMRHierarchyHDF5(HDF5Handle& handle,
00316                      Vector<DisjointBoxLayout>& a_vectGrids,
00317                      Vector<LevelData<FArrayBox>* > & a_vectData,
00318                      Box& a_domain,
00319                      Vector<int>& a_refRatio,
00320                      int& a_numLevels);
00321 // ///
00341  int
00342  ReadEBAMRASCII(const string& filename,
00343                 Vector<DisjointBoxLayout>& a_vectGrids,
00344                 Vector<LevelData<FArrayBox>* > & a_vectData,
00345                 Vector<string>& a_vectNames,
00346                 Box& a_domain,
00347                 Vector<IntVectSet>& a_coveredCells,
00348                Vector<IntVectSet>& a_multiValuedCells,
00349                Vector<int>& a_refRatio,
00350                 int& a_numLevels);
00351 
00352 #endif
00353 
00355 
00359 void
00360 writeFAB(const FArrayBox* a_dataPtr);
00361 
00363 
00368 void
00369 viewFAB(const FArrayBox* a_dataPtr);
00370 
00372 
00376 void
00377 writeFABname(const FArrayBox* a_dataPtr,
00378              const char*      a_filename);
00379 
00381 
00385 void
00386 writeLevel(const LevelData<FArrayBox>* a_dataPtr);
00387 
00389 
00394 void
00395 viewLevel(const LevelData<FArrayBox>* a_dataPtr);
00396 
00398 
00404 void
00405 viewLevelNoGhost(const LevelData<FArrayBox>* a_dataPtr);
00406 
00408 
00412 void
00413 writeLevelname(const LevelData<FArrayBox>* a_dataPtr,
00414                const char*                 a_filename);
00415 
00417 
00422 void
00423 writeDBL(const DisjointBoxLayout* a_dataPtr);
00424 
00426 
00433 void
00434 viewDBL(const DisjointBoxLayout* a_dataPtr);
00435 
00437 
00442 void
00443 writeDBLname(const DisjointBoxLayout* a_dataPtr,
00444              const char*              a_filename);
00445 
00447 
00466 void
00467 WritePartialAMRHierarchyHDF5(const string& filename,
00468                              const Vector<DisjointBoxLayout>& a_vectGrids,
00469                              const Vector<LevelData<FArrayBox>* > & a_vectData,
00470                              const Vector<string>& a_vectNames,
00471                              const Box& a_baseDomain,
00472                              const Real& a_baseDx,
00473                              const Real& a_dt,
00474                              const Real& a_time,
00475                              const Vector<int>& a_vectRatio,
00476                              const Interval& a_levels);
00477 
00478 #endif // HDF5
00479 
00480 // //write a fab out in ascii very slowly
00481  extern void
00482  writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00483 
00484 // //read a  fab in, in ascii, very slowly
00485  extern void
00486  readAFabASCII(istream& is, FArrayBox& fab);
00487 
00488  void writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00489 
00490  void readAFabASCII(istream& is, FArrayBox& fab);
00491 
00492 // ///
00510  void
00511 WriteAMRHierarchyASCII(const string& filename,
00512                        const Vector<DisjointBoxLayout>& a_vectGrids,
00513                        const Vector<LevelData<FArrayBox>* > & a_vectData,
00514                        const Vector<string>& a_vectNames,
00515                        const Box& a_domain,
00516                        const Real& a_dx,
00517                        const Real& a_dt,
00518                        const Real& a_time,
00519                        const Vector<int>& a_vectRatio,
00520                        const int& a_numLevels);
00521 
00522 // ///
00546 int
00547 ReadAMRHierarchyASCII(const string& filename,
00548                       Vector<DisjointBoxLayout>& a_vectGrids,
00549                       Vector<LevelData<FArrayBox>* > & a_vectData,
00550                       Vector<string>& a_vectNames,
00551                       Box& a_domain,
00552                       Real& a_dx,
00553                       Real& a_dt,
00554                       Real& a_time,
00555                       Vector<int>& a_vectRatio,
00556                       int& a_numLevels);
00557 
00558 #endif

Generated on Wed Jan 19 17:51:21 2005 for Chombo&INSwithParticles by doxygen1.2.16