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

DisjointBoxLayout.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 DISJOINTBOXLAYOUT_H
00029 #define DISJOINTBOXLAYOUT_H
00030 
00031 #ifndef WRAPPER
00032 #include "Vector.H"
00033 #include "BoxLayout.H"
00034 #include "ProblemDomain.H"
00035 #endif /*WRAPPER*/
00036 
00038 
00046 class DisjointBoxLayout: public BoxLayout
00047 {
00048 
00049 public:
00050 
00051   friend class Copier;
00052 
00053   // Constructors, destuctors, defines
00054   // =================================
00055 
00057   DisjointBoxLayout();
00058 
00060 
00065   DisjointBoxLayout(const Vector<Box>& a_boxes,
00066                     const Vector<int>& a_procIDs);
00067 
00069 
00074   DisjointBoxLayout(const Vector<Box>& a_boxes,
00075                     const Vector<int>& a_procIDs,
00076                     const ProblemDomain& a_physDomain);
00077 
00079   virtual
00080   ~DisjointBoxLayout(){;}
00081 
00083 
00088   virtual void
00089   define(const Vector<Box>& a_boxes,
00090          const Vector<int>& a_procIDs);
00092 
00097   void
00098   define(BoxLayout& a_layout);
00099 
00101 
00106   void
00107   define(BoxLayout& a_layout, const ProblemDomain& a_physDomain);
00108 
00109 
00110 
00111 
00113 
00118   virtual void
00119   define(const Vector<Box>& a_boxes,
00120          const Vector<int>& a_procIDs,
00121          const ProblemDomain& a_physDomain);
00122   virtual void
00123   define_pd(const Vector<Box>& a_boxes,
00124             const Vector<int>& a_procIDs,
00125                         const ProblemDomain& a_physDomain) {define(a_boxes, a_procIDs,  a_physDomain);}
00126 
00127 
00128 
00129   // other member functions
00130   // ======================
00131 
00133 
00135   virtual void
00136   close();
00137 
00139 
00142   virtual void
00143   deepCopy(const DisjointBoxLayout& a_source);
00144 
00146 
00148   virtual void
00149   deepCopy(const BoxLayout& a_source);
00150 
00151 
00153 
00155   virtual void
00156   deepCopy(const BoxLayout& a_source, const ProblemDomain& a_physDomain);
00157 
00159 
00165   bool
00166   isDisjoint() const;
00167 
00169 
00178   bool checkPeriodic(const ProblemDomain& a_domain) const;
00179 
00184   bool checkDomains(const DisjointBoxLayout& a_dbl) const;
00185 
00187 
00193   friend void coarsen(DisjointBoxLayout& output, 
00194                       const DisjointBoxLayout& input, 
00195                       int refinement);
00196 
00198 
00200   friend void refine(DisjointBoxLayout& output, 
00201                      const DisjointBoxLayout& input, 
00202                      int refinement);
00203 
00204 
00206 
00210   friend void adjCellLo(DisjointBoxLayout& a_output,
00211                         const DisjointBoxLayout& a_input,
00212                         int a_dir, int a_len=1);
00213 
00214 
00216 
00220   friend void adjCellHi(DisjointBoxLayout& a_output,
00221                         const DisjointBoxLayout& a_input,
00222                         int a_dir, int a_len=1);
00223   
00224 
00225 protected:
00226   const ProblemDomain& physDomain() const;
00227 
00228 
00229 
00230 private:
00232   ProblemDomain m_physDomain;
00233 
00234 };
00235 void adjCellLo_dbl(DisjointBoxLayout& a_output,
00236                                    const DisjointBoxLayout& a_input,
00237                                    int a_dir, int a_len);
00238 void adjCellHi_dbl(DisjointBoxLayout& a_output,
00239                                    const DisjointBoxLayout& a_input,
00240                                    int a_dir, int a_len);
00241 void coarsen_dbl(DisjointBoxLayout& output, 
00242                                  const DisjointBoxLayout& input, 
00243                                  int refinement);
00244 void refine_dbl(DisjointBoxLayout& output, 
00245                                 const DisjointBoxLayout& input, 
00246                                 int refinement);
00247 
00248 #ifndef WRAPPER
00249 inline
00250 void adjCellLo_dbl(DisjointBoxLayout& a_output,
00251                                    const DisjointBoxLayout& a_input,
00252                                    int a_dir, int a_len) { adjCellLo(a_output,a_input,a_dir,a_len);}
00253 inline
00254 void adjCellHi_dbl(DisjointBoxLayout& a_output,
00255                            const DisjointBoxLayout& a_input,
00256                            int a_dir, int a_len){ adjCellHi(a_output,a_input,a_dir,a_len);}
00257 inline
00258 void coarsen_dbl(DisjointBoxLayout& output, 
00259                                  const DisjointBoxLayout& input, 
00260                                  int refinement){ coarsen(output, input, refinement);}
00261 inline
00262 void refine_dbl(DisjointBoxLayout& output, 
00263                         const DisjointBoxLayout& input, 
00264                                 int refinement){ refine(output, input, refinement);}
00265 #endif
00266 
00267 #endif

Generated on Wed Apr 16 14:26:49 2003 for Chombo by doxygen1.2.16