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

EBISLayout.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 //  ANAG, LBNL
00028 
00029 #ifndef _EBISLAYOUT_H_
00030 #define _EBISLAYOUT_H_
00031 
00032 #include "REAL.H"
00033 #include "IntVect.H"
00034 #include "IntVectSet.H"
00035 #include "VolIndex.H"
00036 #include "FaceIndex.H"
00037 #include "IntVectSet.H"
00038 #include "EBISBox.H"
00039 #include "DisjointBoxLayout.H"
00040 #include "LevelData.H"
00041 #include "EBGraph.H"
00042 
00043 class EBISLayoutImplem;
00044 
00046 
00052 class EBISLayout
00053 {
00054 public:
00056 
00061   const EBISBox& operator[](const DataIndex& a_index) const;
00062 
00064 
00070   void setMaxRefinementRatio(const int& a_maxRefine);
00071 
00072 
00074 
00080   void setMaxCoarseningRatio(const int& a_maxCoarsen);
00081 
00082 
00084   EBISLayout();
00085 
00086 
00088 
00091   const BoxLayout& getGrownLayout() const;
00092 
00094 
00097   const DisjointBoxLayout& getDisjointLayout() const;
00098 
00100   ~EBISLayout();
00101 
00103 
00109   VolIndex coarsen(const VolIndex& a_vof,
00110                    const int& a_ratio,
00111                    const DataIndex& a_datInd) const;
00112 
00114 
00120   Vector<VolIndex> refine(const VolIndex& a_vof,
00121                           const int& a_ratio,
00122                           const DataIndex& a_datInd) const;
00123 
00125   int getMaxCoarseningRatio() const;
00126   
00128   int getMaxRefinementRatio() const;
00129 
00131   void define(const Box& a_domain,
00132               const DisjointBoxLayout& a_grids,
00133               const int& a_nghost,
00134               const LevelData<EBGraph>& a_graph,
00135               const LevelData<EBData> & a_data);
00136 
00137 protected:
00139   RefCountedPtr<EBISLayoutImplem> m_implem;
00140 };
00141 
00142 
00144 
00149 class EBISLayoutImplem
00150 {
00151 public:
00152 
00154   const EBISBox& operator[](const DataIndex&) const;
00155 
00157   EBISLayoutImplem();
00158 
00160   ~EBISLayoutImplem();
00161 
00163   const BoxLayout& getGrownLayout() const
00164   {
00165     return m_blGhostDom;
00166   }
00167 
00168   const DisjointBoxLayout& getDisjointLayout() const
00169   {
00170     return m_dblInputDom;
00171   }
00172 
00174 
00180   VolIndex coarsen(const VolIndex& a_vof,
00181                    const int& a_ratio,
00182                    const DataIndex& a_datInd) const;
00183 
00185 
00191   Vector<VolIndex> refine(const VolIndex& a_vof,
00192                           const int& a_ratio,
00193                           const DataIndex& a_datInd) const;
00194 
00196 
00202   void setMaxRefinementRatio(const int& a_maxRefine);
00203 
00204 
00206 
00212   void setMaxCoarseningRatio(const int& a_maxCoarsen);
00213 
00215   int getMaxCoarseningRatio() const;
00216   
00218   int getMaxRefinementRatio() const;
00219 
00221   void define(const Box& a_domain,
00222               const DisjointBoxLayout& a_grids,
00223               const int& a_nghost,
00224               const LevelData<EBGraph>& a_graph,
00225               const LevelData<EBData> & a_data);
00226 
00227     
00228 private:
00230   BoxLayout m_blGhostDom;
00231   
00233   DisjointBoxLayout m_dblInputDom;
00234 
00236   Vector<EBISLayout> m_fineLevels;
00237 
00239   Vector<EBISLayout> m_coarLevels;
00240 
00242   int m_nghost;
00243 
00245   int m_maxCoarseningRatio;
00246 
00248   int m_maxRefinementRatio;
00249 
00251   Box m_domain;
00252 
00254   LayoutData<EBISBox> m_ebisBoxes;
00255 
00256 private:
00257   void operator=(const EBISLayoutImplem& ebiin)
00258   {;}
00259   EBISLayoutImplem(const EBISLayoutImplem& ebiin)
00260   {;}
00261 
00262 };
00263 
00264 
00265 
00266 #endif

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