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

EBFineToCoarRedist.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  11-07-2001
00028 
00029 #ifndef _EBFineToCoarRedist_H_
00030 #define _EBFineToCoarRedist_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 EBFineToCoarRedist
00051 {
00052 public:
00053 
00054   friend class EBFluxRegister;
00055 
00057 
00063   void
00064   resetWeights(const LevelData<EBCellFAB>& a_modifierCoar,
00065                const int& a_ivar);
00066 
00068 
00071   EBFineToCoarRedist();
00072 
00074   ~EBFineToCoarRedist();
00075 
00077 
00083   void define(const DisjointBoxLayout& a_dblFine,
00084               const DisjointBoxLayout& a_dblCoar,
00085               const EBISLayout& a_ebislFine,
00086               const EBISLayout& a_ebislCoar,
00087               const Box& a_domainCoar,
00088               const int& a_nref,
00089               const int& a_nvar,
00090               int a_redistRad = 1);
00091 
00092 
00094 
00097   void setToZero(); 
00098 
00100 
00106   void increment(const BaseIVFAB<Real>& a_fineMass,
00107                  const DataIndex& a_fineDataIndex,
00108                  const Interval&  a_variables);
00109 
00110 
00112 
00115   void redistribute(LevelData<EBCellFAB>& a_coarSolution,
00116                     const Interval& a_variables);
00117 
00119   bool isDefined() const;
00120 
00121 protected:
00122 
00123   //internal use only
00124   void setDefaultValues();
00125 
00126   bool m_isDefined;
00127   int m_redistRad;
00128   int m_nComp;
00129   int m_refRat;
00130   Box m_domainCoar;
00131 
00132   //input fine grid
00133   DisjointBoxLayout    m_gridsFine;
00134   //input coarse grid
00135   DisjointBoxLayout    m_gridsCoar;
00136   //input coarse grid
00137   //RefCoar is short for refinedCoarse
00138   DisjointBoxLayout    m_gridsRefCoar;
00139 
00140   //buffers on fine layout
00141   LevelData<BaseIVFAB<Real> > m_regsFine;
00142   //buffers on refineed coarse layout
00143   LevelData<BaseIVFAB<Real> > m_regsRefCoar;
00144 
00145   //need both of these to facilitate mass-weighted 
00146   //redistribution
00147   LayoutData<BaseIVFAB<VoFStencil> > m_stenRefCoar;
00148   LayoutData<BaseIVFAB<VoFStencil> > m_volumeStenc;
00149   LayoutData<BaseIVFAB<VoFStencil> > m_standardStenc;
00150 
00151   LevelData<EBCellFAB> m_densityCoar;
00152   //location of mass sources on fine layout
00153   LayoutData<IntVectSet> m_setsFine;
00154   //location of mass sources on refined coarse layout
00155   LayoutData<IntVectSet> m_setsRefCoar;
00156 
00157   //ebisl of input fine grid
00158   EBISLayout m_ebislFine;
00159   //ebisl of input coar grid
00160   EBISLayout m_ebislCoar;
00161   //ebisl of refined coarse layout
00162   EBISLayout m_ebislRefCoar;
00163 
00164 private:
00165   //For all the usual reasons,
00166   //there is no copy constructor for this class.
00167   //Neither is there an operator= for this class.
00168   void operator= (const EBFineToCoarRedist&)
00169   {
00170     MayDay::Error("invalid operator");
00171   }
00172   EBFineToCoarRedist(const EBFineToCoarRedist&)
00173   {
00174     MayDay::Error("invalid operator");
00175   }
00176 };
00177 #endif

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