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

EBCoarToFineRedist.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-02-2001
00028 
00029 #ifndef _EBCoarToFineRedist_H_
00030 #define _EBCoarToFineRedist_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 
00049 class EBCoarToFineRedist
00050 {
00051 public:
00052 
00053   friend class EBFluxRegister;
00054 
00056 
00059   EBCoarToFineRedist();
00060 
00062   ~EBCoarToFineRedist();
00063 
00065 
00068   void setToZero(); 
00069 
00071 
00077   void increment(const BaseIVFAB<Real>& a_coarseMass,
00078                  const DataIndex& a_coarseDataIndex,
00079                  const Interval&  a_variables);
00080 
00081 
00083 
00086   void redistribute(LevelData<EBCellFAB>& a_fineSolution,
00087                     const Interval& a_variables);
00088 
00090   bool isDefined() const;
00091 
00093 
00099   void define(const DisjointBoxLayout& a_dblFine,
00100               const DisjointBoxLayout& a_dblCoar,
00101               const EBISLayout& a_ebislFine,
00102               const EBISLayout& a_ebislCoar,
00103               const Box& a_domainCoar,
00104               const int& a_nref,
00105               const int& a_nvar,
00106               int redistRad = 1);
00107 
00109 
00111   void
00112   resetWeights(const LevelData<EBCellFAB>& a_modifierCoar,
00113                const int& a_ivar);
00114 protected:
00115 
00116   //internal use only
00117   void setDefaultValues();
00118 
00119   bool m_isDefined;
00120   int m_redistRad;
00121   int m_nComp;
00122   int m_refRat;
00123   Box m_domainCoar;
00124 
00125   //input fine grid
00126   DisjointBoxLayout    m_gridsFine;
00127   //input coarse grid
00128   DisjointBoxLayout    m_gridsCoar;
00129   //input coarse grid
00130   //CedFine is short for coarsenedfine
00131   DisjointBoxLayout    m_gridsCedFine;
00132 
00133   LevelData<BaseIVFAB<Real> > m_regsCoar;
00134   LevelData<BaseIVFAB<Real> > m_regsCedFine;
00135 
00136   LevelData<EBCellFAB> m_densityCedFine;
00137 
00138   LayoutData<BaseIVFAB<VoFStencil> > m_stenCedFine;
00139   //need both of these to accomodate reweighting the stencil
00140   LayoutData<BaseIVFAB<VoFStencil> > m_volumeStenc;
00141   LayoutData<BaseIVFAB<VoFStencil> > m_standardStenc;
00142 
00143 
00144   LayoutData<IntVectSet> m_setsCedFine;
00145   LayoutData<IntVectSet> m_setsCoar;
00146   
00147 
00148   //ebisl of input fine grid
00149   EBISLayout m_ebislFine;
00150   //ebisl of input coar grid
00151   EBISLayout m_ebislCoar;
00152   //ebisl of coarsened fine layout
00153   EBISLayout m_ebislCedFine;
00154 
00155 private:
00156   //For all the usual reasons,
00157   //there is no copy constructor for this class.
00158   //Neither is there an operator= for this class.
00159   void operator= (const EBCoarToFineRedist&)
00160   {
00161     MayDay::Error("invalid operator");
00162   }
00163   EBCoarToFineRedist(const EBCoarToFineRedist&)
00164   {
00165     MayDay::Error("invalid operator");
00166   }
00167 };
00168 #endif

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