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

AMRLevel.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 
00028 #ifndef _AMRLEVEL_H_
00029 #define _AMRLEVEL_H_
00030 
00031 #include "REAL.H"
00032 #include "Box.H"
00033 #include "DisjointBoxLayout.H"
00034 #include "ProblemDomain.H"
00035 
00036 class HDF5Handle;
00037 class IntVectSet;
00038 template <class TTYPE> class Vector;
00039 
00041 
00060 class AMRLevel
00061 {
00062 public:
00065 
00069   AMRLevel ();
00070 
00071 
00073 
00076   virtual 
00077   ~AMRLevel ();
00078 
00080 
00090   virtual
00091   void
00092   define (AMRLevel* a_coarser_level_ptr,
00093           const Box& a_problem_domain,
00094           int a_level,
00095           int a_ref_ratio);
00096 
00098 
00108   virtual
00109   void
00110   define (AMRLevel* a_coarser_level_ptr,
00111           const ProblemDomain& a_problem_domain,
00112           int a_level,
00113           int a_ref_ratio);
00114 
00115 
00118 
00122   virtual
00123   void
00124   finerLevelPtr (AMRLevel* a_finer_level_ptr);
00125 
00127 
00131   virtual
00132   void
00133   dt (Real a_dt);
00134 
00136 
00140   virtual
00141   void
00142   time (Real a_time);
00143 
00145 
00147 
00151   virtual
00152   Real
00153   dt () const;
00154 
00156 
00160   virtual
00161   Real 
00162   time () const;
00163 
00165 
00168   virtual
00169   void
00170   initialDtMultiplier(Real a_initial_dt_multiplier);
00171 
00173 
00175 
00178   virtual
00179   Real 
00180   initialDtMultiplier() const;
00181 
00183 
00187   virtual
00188   const ProblemDomain&
00189   problemDomain () const;
00190 
00192 
00196   virtual
00197   Vector<Box>
00198   boxes () const;
00199 
00201 
00205   bool
00206   isDefined() const;
00207 
00209 
00213   virtual
00214   int
00215   refRatio () const;
00216 
00218 
00223   static
00224   void
00225   verbosity (int a_verbosity);
00226 
00228 
00233   static
00234   int
00235   verbosity ();
00236 
00237 
00240 
00247   virtual
00248   Real
00249   advance () = 0;
00250 
00252 
00259   virtual
00260   void
00261   postTimeStep () = 0;
00262 
00264 
00271   virtual
00272   void
00273   tagCells (IntVectSet& a_tags)  = 0;
00274 
00276 
00283   virtual
00284   void
00285   tagCellsInit (IntVectSet& a_tags)  = 0;
00286 
00288 
00295   virtual
00296   void
00297   regrid (const Vector<Box>& a_new_grids) = 0;
00298 
00299 
00300 
00301 
00302 
00304 
00311   virtual
00312   void 
00313   postRegrid (int a_base_level);
00314 
00315 
00316 
00318 
00325   virtual
00326   void
00327   initialGrid (const Vector<Box>& a_new_grids) = 0;
00328 
00330 
00337   virtual
00338   void
00339   initialData () = 0;
00340 
00342 
00349   virtual
00350   void
00351   postInitialize () = 0;
00352 
00354 
00361   virtual
00362   Real
00363   computeDt () = 0;
00364 
00366 
00373   virtual
00374   Real
00375   computeInitialDt () = 0;
00376 
00377 #ifdef HDF5
00378 
00380 
00382 
00389   virtual
00390   void
00391   writeCheckpointHeader (HDF5Handle& a_handle) const = 0;
00392 
00394 
00401   virtual
00402   void
00403   writeCheckpointLevel (HDF5Handle& a_handle) const = 0;
00404  
00406 
00413   virtual
00414   void
00415   readCheckpointHeader (HDF5Handle& a_handle) = 0;
00416 
00418 
00425   virtual
00426   void
00427   readCheckpointLevel (HDF5Handle& a_handle) = 0;
00428  
00430 
00437   virtual
00438   void
00439   writePlotHeader (HDF5Handle& a_handle) const = 0;
00440 
00442 
00449   virtual
00450   void
00451   writePlotLevel (HDF5Handle& a_handle) const = 0;
00452 
00453 #endif
00454 
00455 protected:
00456   // the problem domain
00457   ProblemDomain m_problem_domain;
00458   //
00459   Vector<Box> m_level_grids;
00460   // the level
00461   int m_level;
00462   // refinement ratio
00463   int m_ref_ratio;
00464   // initial time step multipier
00465   Real m_initial_dt_multiplier;
00466   // time step
00467   Real m_dt;
00468   // time
00469   Real m_time;
00470   // pointer to next coarser level
00471   AMRLevel* m_coarser_level_ptr;
00472   // pointer to next finer level
00473   AMRLevel* m_finer_level_ptr;
00474   // verbosity level
00475   static int s_verbosity;
00476   bool m_isDefined;
00477 };
00478 
00479 #endif

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