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

EBPWLFillPatch.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 fri, sept 7, 2001
00028 
00029 #ifndef _EB_PWL_FILL_PATCH_H_
00030 #define _EB_PWL_FILL_PATCH_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 
00048 class EBPWLFillPatch
00049 {
00050 public:
00052 
00055   EBPWLFillPatch();
00056 
00058   ~EBPWLFillPatch();
00059 
00061 
00076   EBPWLFillPatch(const DisjointBoxLayout& a_dblFine,
00077                  const DisjointBoxLayout& a_dblCoar,
00078                  const EBISLayout& a_ebislFine,
00079                  const EBISLayout& a_ebislCoar,
00080                  const Box& a_domainCoar,
00081                  const int& a_nref,
00082                  const int& a_nvar,
00083                  const int& a_radius);
00084 
00086 
00100   void define(const DisjointBoxLayout& a_dblFine,
00101               const DisjointBoxLayout& a_dblCoar,
00102               const EBISLayout& a_ebislFine,
00103               const EBISLayout& a_ebislCoar,
00104               const Box& a_domainCoar,
00105               const int& a_nref,
00106               const int& a_nvar,
00107               const int& a_radius);
00108 
00110 
00114   bool isDefined() const;
00115 
00117 
00132   void
00133   interpolate(LevelData<EBCellFAB>& a_fineData,
00134               const LevelData<EBCellFAB>& a_coarDataOld,
00135               const LevelData<EBCellFAB>& a_coarDataNew,
00136               const Real& a_coarTimeOld,
00137               const Real& a_coarTimeNew,
00138               const Real& a_fineTime,
00139               const Interval& a_variables);          
00140 
00141 protected:
00142 
00143   //internal use only functions
00144   void
00145   interpolateFAB(EBCellFAB& a_fine,
00146                  const EBCellFAB& a_coarOld,
00147                  const EBCellFAB& a_coarNew,
00148                  const Real& a_coarTimeOld,
00149                  const Real& a_coarTimeNew,
00150                  const Real& a_fineTime,
00151                  const DataIndex& a_datInd,
00152                  const Interval& a_variables) const;
00153 
00154   void
00155   makeStencils();
00156 
00157   void setDefaultValues();
00158 
00159   bool m_isDefined;
00160 
00161   bool extractFromSten(Real& a_value,
00162                        const VoFStencil& a_vofsten,
00163                        const EBCellFAB& a_coarData,
00164                        const int& ivar) const;
00165   
00166   Real computeDMinMod(const BaseIVFAB<VoFStencil >& a_lostenBF,
00167                       const BaseIVFAB<VoFStencil >& a_histenBF,
00168                       const VolIndex& a_coarVoF,
00169                       const EBCellFAB& a_coarData,
00170                       const int& ivar,
00171                       const IntVectSet& loInterpSet,
00172                       const IntVectSet& hiInterpSet,
00173                       const IntVectSet& ceInterpSet) const;
00174 
00175   //bloated class data
00176   Box m_coarDomain;
00177   DisjointBoxLayout m_coarsenedFineGrids;
00178   DisjointBoxLayout m_fineGrids;
00179   DisjointBoxLayout m_coarGrids;
00180   EBISLayout m_coarsenedFineEBISL;
00181   EBISLayout m_fineEBISL;
00182 
00183   LevelData<EBCellFAB> m_coarsenedFineData;
00184   LevelData<EBCellFAB> m_coarOnFDataOld;
00185   LevelData<EBCellFAB> m_coarOnFDataNew;
00186 
00187   int m_refRat;
00188   int m_nComp;
00189   int m_radius;
00190   int m_coarGhostRad;
00191 
00192   //places to do interpolation 
00193   //at fine refinement level 
00194   LayoutData<IntVectSet> m_irregRegionsFine;
00195 
00196   //diffs high and low---need to make the choice
00197   //about which to use based on the data.   one
00198   //for each direction of the derivative.
00199   LayoutData<BaseIVFAB<VoFStencil> >  m_hiStencils[SpaceDim];
00200   LayoutData<BaseIVFAB<VoFStencil> >  m_loStencils[SpaceDim];
00201 
00202   // per-grid coarse locations that you interpolate from, by type of
00203   // interpolation in the specified coordinate direction.
00204   //this specifies constraints due to domain and union of rectangles
00205   //at coarse level
00206   LayoutData<IntVectSet> m_coarCeInterp[SpaceDim];
00207   LayoutData<IntVectSet> m_coarLoInterp[SpaceDim];
00208   LayoutData<IntVectSet> m_coarHiInterp[SpaceDim];
00209 
00210 private:  
00211   //disallowed for all the usual reasons
00212   EBPWLFillPatch(const EBPWLFillPatch& ebcin)
00213   {
00214     MayDay::Error("ebpwl 2 invalid operator");
00215   }
00216   void operator=(const EBPWLFillPatch& fabin)
00217   {
00218     MayDay::Error("ebpwl 3 invalid operator");
00219   }
00220 };
00221 
00222 #endif

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