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 
00057 
00059 
00062   DisjointBoxLayout();
00063 
00065 
00070   DisjointBoxLayout(const Vector<Box>& a_boxes,
00071                     const Vector<int>& a_procIDs);
00072 
00074 
00079   DisjointBoxLayout(const Vector<Box>& a_boxes,
00080                     const Vector<int>& a_procIDs,
00081                     const ProblemDomain& a_physDomain);
00082 
00084 
00089   virtual
00090   ~DisjointBoxLayout(){;}
00091 
00093 
00098   virtual void
00099   define(const Vector<Box>& a_boxes,
00100          const Vector<int>& a_procIDs);
00101 
00103 
00108   void
00109   define(BoxLayout& a_layout);
00110 
00112 
00117   void
00118   define(BoxLayout& a_layout, const ProblemDomain& a_physDomain);
00119 
00121 
00126   virtual void
00127   define(const Vector<Box>& a_boxes,
00128          const Vector<int>& a_procIDs,
00129          const ProblemDomain& a_physDomain);
00130 
00132 
00135   virtual void
00136   define_pd(const Vector<Box>& a_boxes,
00137             const Vector<int>& a_procIDs,
00138             const ProblemDomain& a_physDomain)
00139   {define(a_boxes, a_procIDs,  a_physDomain);}
00140 
00147 
00149 
00156   bool
00157   isDisjoint() const;
00158 
00160 
00171   bool checkPeriodic(const ProblemDomain& a_domain) const;
00172 
00179   bool checkDomains(const DisjointBoxLayout& a_dbl) const;
00180 
00187 
00189 
00191   virtual void
00192   close();
00193 
00195 
00200   virtual void
00201   deepCopy(const DisjointBoxLayout& a_source);
00202 
00204 
00208   virtual void
00209   deepCopy(const BoxLayout& a_source);
00210 
00212 
00216   virtual void
00217   deepCopy(const BoxLayout& a_source, const ProblemDomain& a_physDomain);
00218 
00220 
00236   friend void coarsen(DisjointBoxLayout& output, 
00237                       const DisjointBoxLayout& input, 
00238                       int refinement);
00239 
00241 
00256   friend void refine(DisjointBoxLayout& output, 
00257                      const DisjointBoxLayout& input, 
00258                      int refinement);
00259 
00266 
00268 
00272   friend void adjCellLo(DisjointBoxLayout& a_output,
00273                         const DisjointBoxLayout& a_input,
00274                         int a_dir, int a_len=1);
00275 
00276 
00278 
00282   friend void adjCellHi(DisjointBoxLayout& a_output,
00283                         const DisjointBoxLayout& a_input,
00284                         int a_dir, int a_len=1);
00285   
00286 
00289 protected:
00290   const ProblemDomain& physDomain() const;
00291 
00292 private:
00294   ProblemDomain m_physDomain;
00295 
00296 };
00297 void adjCellLo_dbl(DisjointBoxLayout& a_output,
00298                    const DisjointBoxLayout& a_input,
00299                    int a_dir, int a_len);
00300 void adjCellHi_dbl(DisjointBoxLayout& a_output,
00301                    const DisjointBoxLayout& a_input,
00302                    int a_dir, int a_len);
00303 void coarsen_dbl(DisjointBoxLayout& output, 
00304                  const DisjointBoxLayout& input, 
00305                  int refinement);
00306 void refine_dbl(DisjointBoxLayout& output, 
00307                 const DisjointBoxLayout& input, 
00308                 int refinement);
00309 
00310 #ifndef WRAPPER
00311 inline
00312 void adjCellLo_dbl(DisjointBoxLayout& a_output,
00313                    const DisjointBoxLayout& a_input,
00314                    int a_dir, int a_len)
00315 { adjCellLo(a_output,a_input,a_dir,a_len);}
00316 inline
00317 void adjCellHi_dbl(DisjointBoxLayout& a_output,
00318                    const DisjointBoxLayout& a_input,
00319                    int a_dir, int a_len)
00320 { adjCellHi(a_output,a_input,a_dir,a_len);}
00321 inline
00322 void coarsen_dbl(DisjointBoxLayout& output, 
00323                  const DisjointBoxLayout& input, 
00324                  int refinement)
00325 { coarsen(output, input, refinement);}
00326 inline
00327 void refine_dbl(DisjointBoxLayout& output, 
00328                 const DisjointBoxLayout& input, 
00329                 int refinement)
00330 { refine(output, input, refinement);}
00331 #endif
00332 
00333 #endif

Generated on Wed Jun 2 13:53:32 2004 for Chombo&INSwithParticles by doxygen 1.3.2