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

RedistStencil.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 // dtgraves weds oct 3 2001
00028 
00029 #ifndef _Redist_stencil_H_
00030 #define _Redist_stencil_H_
00031 
00032 #include "REAL.H"
00033 #include "FArrayBox.H"
00034 #include "LevelData.H"
00035 #include "DisjointBoxLayout.H"
00036 #include "EBISLayout.H"
00037 #include "EBCellFAB.H"
00038 #include "Interval.H"
00039 #include "Stencils.H"
00040 #include "BaseIVFAB.H"
00041 
00043 
00049 class RedistStencil
00050 {
00051 public:
00053 
00056   RedistStencil();
00057 
00059   ~RedistStencil();
00060 
00062 
00067   RedistStencil(const DisjointBoxLayout& dbl,
00068                       const EBISLayout& ebisl,
00069                       const Box& domain,
00070                       const int& redistRadius);
00071 
00073 
00077   void define(const DisjointBoxLayout& dbl,
00078               const EBISLayout& ebisl,
00079               const Box& domain,
00080               const int& redistRadius);
00081 
00083 
00087   bool isDefined() const;
00088 
00089 
00091 
00097   void resetWeights(const LevelData<EBCellFAB>& a_modifier,
00098                     const int& a_ivar);
00099 
00101 
00105   const BaseIVFAB<VoFStencil >& 
00106   operator[](const DataIndex& datInd) const;
00107 
00109 
00112   void deepCopy(const RedistStencil& a_stenin);
00113 
00115 
00117   int getRedistRadius() const;
00118 
00119 protected:
00120 
00121   LayoutData<BaseIVFAB<VoFStencil > > m_stencil;
00122   LayoutData<BaseIVFAB<VoFStencil > > m_volsten;
00123   DisjointBoxLayout  m_grids;
00124   Box m_domain;
00125   EBISLayout m_ebisl;
00126   bool m_isDefined;
00127   bool m_hasDefaultWeights;
00128   int m_redistRadius;
00129 
00130 private:
00131   //internal use
00132   void computePointStencil(VoFStencil& a_stencil,
00133                            const VolIndex&   a_srcVoF,
00134                            const DataIndex&  a_datInd);
00135   
00136   //disallowed for all the usual reasons
00137   RedistStencil(const RedistStencil& ebcin)
00138   {
00139     MayDay::Error("rdsi 2 invalid operator");
00140   }
00141   void operator=(const RedistStencil& fabin)
00142   {
00143     MayDay::Error("rdsi 3 invalid operator");
00144   }
00145 };
00146 
00147 
00148 
00149 #endif
00150  

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