Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class 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 CH_USE_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 
00377 void
00378 browseFAB(const FArrayBox* a_dataPtr);
00379 
00381 
00385 void
00386 writeBFR(const BaseFab<Real>* a_dataPtr);
00387 
00389 
00394 void
00395 viewBFR(const BaseFab<Real>* a_dataPtr);
00396 
00398 
00404 void
00405 writeFABname(const FArrayBox      * a_dataPtr,
00406              const char           * a_filename,
00407              const Vector<string> & a_compNames = Vector<string>());
00408 
00410 
00414 void
00415 writeLevel(const LevelData<FArrayBox>* a_dataPtr);
00416 
00418 
00423 void
00424 viewLevel(const LevelData<FArrayBox>* a_dataPtr);
00425 
00427 
00433 void
00434 viewLevelNoGhost(const LevelData<FArrayBox>* a_dataPtr);
00435 
00437 
00441 void
00442 writeLevelname(const LevelData<FArrayBox>* a_dataPtr,
00443                const char*                 a_filename);
00444 
00446 
00451 void
00452 writeDBL(const DisjointBoxLayout* a_dataPtr);
00453 
00455 
00462 void
00463 viewDBL(const DisjointBoxLayout* a_dataPtr);
00464 
00466 
00471 void
00472 writeDBLname(const DisjointBoxLayout* a_dataPtr,
00473              const char*              a_filename);
00474 
00476 
00495 void
00496 WritePartialAMRHierarchyHDF5(const string& filename,
00497                              const Vector<DisjointBoxLayout>& a_vectGrids,
00498                              const Vector<LevelData<FArrayBox>* > & a_vectData,
00499                              const Vector<string>& a_vectNames,
00500                              const Box& a_baseDomain,
00501                              const Real& a_baseDx,
00502                              const Real& a_dt,
00503                              const Real& a_time,
00504                              const Vector<int>& a_vectRatio,
00505                              const Interval& a_levels);
00506 
00507 #endif // CH_USE_HDF5
00508 
00509 // //write a fab out in ascii very slowly
00510  extern void
00511  writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00512 
00513 // //read a  fab in, in ascii, very slowly
00514  extern void
00515  readAFabASCII(istream& is, FArrayBox& fab);
00516 
00517  void writeAFabASCII(std::ostream& os, const FArrayBox& fab);
00518 
00519  void readAFabASCII(istream& is, FArrayBox& fab);
00520 
00521 // ///
00539  void
00540 WriteAMRHierarchyASCII(const string& filename,
00541                        const Vector<DisjointBoxLayout>& a_vectGrids,
00542                        const Vector<LevelData<FArrayBox>* > & a_vectData,
00543                        const Vector<string>& a_vectNames,
00544                        const Box& a_domain,
00545                        const Real& a_dx,
00546                        const Real& a_dt,
00547                        const Real& a_time,
00548                        const Vector<int>& a_vectRatio,
00549                        const int& a_numLevels);
00550 
00551 // ///
00575 int
00576 ReadAMRHierarchyASCII(const string& filename,
00577                       Vector<DisjointBoxLayout>& a_vectGrids,
00578                       Vector<LevelData<FArrayBox>* > & a_vectData,
00579                       Vector<string>& a_vectNames,
00580                       Box& a_domain,
00581                       Real& a_dx,
00582                       Real& a_dt,
00583                       Real& a_time,
00584                       Vector<int>& a_vectRatio,
00585                       int& a_numLevels);
00586 
00587 #endif

Generated on Wed Oct 5 13:52:08 2005 for Chombo&AMRSelfGravity by  doxygen 1.4.1