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

EBCoarToCoarRedist.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 mon nov 19 2001
00028 
00029 #ifndef _EBCoar_To_Coar_Redist_H_
00030 #define _EBCoar_To_Coar_Redist_H_
00031 #include "REAL.H"
00032 #include "Vector.H"
00033 #include "EBCellFAB.H"
00034 #include "EBFaceFAB.H"
00035 #include "EBISLayout.H"
00036 #include "EBISBox.H"
00037 #include "IntVectSet.H"
00038 #include "CFStencil.H"
00039 #include "LoHiSide.H"
00040 #include "LevelData.H"
00041 #include "LayoutData.H"
00042 #include "RedistStencil.H"
00043 
00044 
00046 
00050 class EBCoarToCoarRedist
00051 {
00052 public:
00053   
00054   friend class EBFluxRegister;
00055 
00057 
00060   EBCoarToCoarRedist();
00061 
00063   ~EBCoarToCoarRedist();
00064 
00066 
00077   void define(const DisjointBoxLayout& a_dblFine,
00078               const DisjointBoxLayout& a_dblCoar,
00079               const EBISLayout& a_ebislFine,
00080               const EBISLayout& a_ebislCoar,
00081               const Box& a_domainCoar,
00082               const int& a_nref,
00083               const int& a_nvar,
00084               int a_redistRad = 1);
00085 
00087 
00090   void setToZero(); 
00091 
00093 
00098   void increment(const BaseIVFAB<Real>& a_coarMass,
00099                  const DataIndex& a_fineDataIndex,
00100                  const Interval&  a_variables);
00101 
00102 
00104 
00106   void
00107   resetWeights(const LevelData<EBCellFAB>& a_modifier,
00108                const int& a_ivar);
00109 
00111 
00114   void redistribute(LevelData<EBCellFAB>& a_coarSolution,
00115                     const Interval& a_variables);
00116 
00118   bool isDefined() const;
00119 
00120 protected:
00121 
00122   //internal use only
00123   void setDefaultValues();
00124 
00125   bool m_isDefined;
00126   int  m_redistRad;
00127   int  m_nComp;
00128   int  m_refRat;
00129   Box  m_domainCoar;
00130 
00131   //input fine grid
00132   DisjointBoxLayout    m_gridsFine;
00133   //input coarse grid
00134   DisjointBoxLayout    m_gridsCoar;
00135 
00136   //buffers on refineed coarse layout
00137   LevelData<BaseIVFAB<Real> > m_regsCoar;
00138 
00139   //location of mass sources on refined coarse layout
00140   LayoutData<IntVectSet> m_setsCoar;
00141 
00142   //ebisl of input fine grid
00143   EBISLayout m_ebislFine;
00144   //ebisl of input coar grid
00145   EBISLayout m_ebislCoar;
00146  
00147   LayoutData<BaseIVFAB<VoFStencil> > m_stenCoar;
00148   //need both of these to facilitate mass-weighted 
00149   //redistribution
00150   LayoutData<BaseIVFAB<VoFStencil> > m_volumeStenc;
00151   LayoutData<BaseIVFAB<VoFStencil> > m_standardStenc;
00152   LevelData<EBCellFAB> m_densityCoar;
00153  
00154 private:
00155   //For all the usual reasons,
00156   //there is no copy constructor for this class.
00157   //Neither is there an operator= for this class.
00158   void operator= (const EBCoarToCoarRedist&)
00159   {
00160     MayDay::Error("invalid operator");
00161   }
00162   EBCoarToCoarRedist(const EBCoarToCoarRedist&)
00163   {
00164     MayDay::Error("invalid operator");
00165   }
00166 };
00167 
00168 #endif

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