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

EBPoissonOp.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, July 21, 1999
00028 
00029 #ifndef _EBPOISSONOP_H_
00030 #define _EBPOISSONOP_H_
00031 
00032 #include <iostream>
00033 #include <cmath>
00034 #include <assert.h>
00035 #include <cstdlib>
00036 
00037 #include "REAL.H"
00038 #include "IntVect.H"
00039 #include "Box.H"
00040 #include "DisjointBoxLayout.H"
00041 #include "LevelData.H"
00042 #include "BaseFab.H"
00043 
00044 #include "QuadCFInterp.H"
00045 #include "Copier.H"
00046 
00047 #include "EBCellFAB.H"
00048 
00049 // #include "RegCFIVS.H"
00050 // #include "RegGhostBC.H"
00051 
00052 #include "EBLevelOp.H"
00053 #include "GenBaseBottomSmoother.H"
00054 
00056 
00058 class EBPoissonOp: public EBLevelOp
00059 {
00060 public:
00062   EBPoissonOp();
00063 
00065   ~EBPoissonOp();
00066 
00068 
00071   virtual EBPoissonOp* newOp() const;
00072 
00074   virtual bool isDefined() const;
00075 
00077 
00081   void define(const DisjointBoxLayout& a_grids,
00082               const DisjointBoxLayout* a_baseBAPtr,
00083               Real                     a_dxLevel, 
00084               int                      a_refRatio,
00085               const Box&               a_domain,
00086               bool                     a_homogeneousOnly = false,
00087               int                      a_ncomp = 1);
00088 
00090 
00094   void define(const DisjointBoxLayout& a_grids,
00095               const DisjointBoxLayout* a_baseBAPtr,
00096               Real                     a_dxLevel, 
00097               int                      a_refRatio,
00098               const ProblemDomain&     a_domain,
00099               bool                     a_homogeneousOnly = false,
00100               int                      a_ncomp = 1);
00101 
00103 
00107   void define(const GenLevelOp<EBCellFAB>* a_opfine,
00108               int                          a_reftoFine);
00109 
00111 
00117   void smooth(LevelData<EBCellFAB>&       a_phi,
00118               const LevelData<EBCellFAB>& a_rhs);
00119 
00121 
00124   virtual void levelPreconditioner(LevelData<EBCellFAB>&       a_phihat,
00125                                    const LevelData<EBCellFAB>& a_rhshat);
00126 
00128 
00132   void applyOpH(LevelData<EBCellFAB>& a_phi,
00133                 LevelData<EBCellFAB>& a_LOfPhi);
00134 
00136 
00140   void applyOpI(LevelData<EBCellFAB>&       a_phi,
00141                 const LevelData<EBCellFAB>* a_phiCoarsePtr,
00142                 LevelData<EBCellFAB>&       a_LOfPhi);
00143 
00145 
00149   void applyOpHcfIphys(LevelData<EBCellFAB>& a_phi,
00150                        LevelData<EBCellFAB>& a_lOfPhi);
00151 
00153 
00157   void applyOpIcfHphys(LevelData<EBCellFAB>&       a_phi,
00158                        const LevelData<EBCellFAB>* a_phiCoarsePtr,
00159                        LevelData<EBCellFAB>&       a_LOfPhi);
00160 
00162 
00165   void CFInterp(LevelData<EBCellFAB>&       a_phi,
00166                 const LevelData<EBCellFAB>& a_phiCoarse);
00167 
00169 
00172   void homogeneousCFInterp(LevelData<EBCellFAB>& a_phi);
00173 
00175 
00178   void homogeneousCFInterp(LevelData<EBCellFAB>& a_phif, 
00179                            const DataIndex&      a_datInd, 
00180                            int                   a_idir, 
00181                            Side::LoHiSide        a_hiorlo);
00182 
00183 #if FIXIT
00184 
00185   void setDomainGhostBC(const EBDomainGhostBC& a_dombcin);
00186 #endif
00187 
00189   void setBottomSmoother(const GenBaseBottomSmoother<LevelData<EBCellFAB> >& a_bottomSmoother);
00190 
00192 
00196   void bottomSmoother(LevelData<EBCellFAB>&       a_phi,
00197                       const LevelData<EBCellFAB>& a_rhs);
00198 
00199 #if FIXIT
00200 
00201 
00207   void getFlux(EBCellFAB&       a_fineFlux, 
00208                const EBCellFAB& a_data, 
00209                const DataIndex& a_datInd,
00210                int              a_dir);
00211 #endif
00212 
00213 protected:
00214 #if FIXIT
00215   // boundary conditons
00216   EBDomainGhostBC m_domghostbc;
00217 #endif
00218 
00219   // domain of fine grid
00220   ProblemDomain m_domain;
00221 
00222   // the grids at the current level
00223   DisjointBoxLayout m_grids;
00224 
00225   // Copier object that knows how to perform exchange operations on 
00226   // LevelData objects defined on m_grids
00227   Copier m_exchangeCopier;
00228 
00229   /* DisjointBoxLayout for next coarser level
00230      this is == NULL if there is no coarser level */
00231   DisjointBoxLayout m_baseBA;
00232 
00233   // number of components
00234   int m_ncomp;
00235 
00236   // refinement ratio between this and the next coarser level
00237   int m_refRatio;
00238 
00239   // mesh spacing at this level
00240   Real m_dxLevel;
00241 
00242   // mesh spacing at next coarser level
00243   Real m_dxCrse;
00244 
00245   /*
00246     coarse-fine information between this level
00247     and the next coarser level
00248   */
00249   QuadCFInterp m_quadCFI;
00250 
00252   /* bottom smoother object
00253    */
00254   GenBaseBottomSmoother<LevelData<EBCellFAB> >* m_bottomSmootherPtr;
00255 
00256   // has full define function been called?
00257   bool m_isDefined;
00258 
00259   // has bc been defined?
00260   bool m_isBCDefined;
00261 
00262   // is inhomogeneous CF interpolation possible?
00263   bool m_ihcfiEnabled;
00264 
00265 #if FIXIT
00266   LayoutData<EBCFIVS> m_loCFIVS[SpaceDim];
00267   LayoutData<EBCFIVS> m_hiCFIVS[SpaceDim];
00268 #endif
00269 
00270 private:
00271   // internally useful functions
00272   void
00273   levelGSRB(LevelData<EBCellFAB>&       a_phi, 
00274             const LevelData<EBCellFAB>& a_rhs);
00275   void
00276   interpOnIVS(LevelData<EBCellFAB>& a_phif, 
00277               const EBCellFAB&      a_phistar, 
00278               const DataIndex&      a_dFine,
00279               const int             a_idir,
00280               const Side::LoHiSide  a_hiorlo,
00281               const IntVectSet&     a_interpIVS);
00282 
00283   void clearMemory();
00284 
00285   void setDefaultValues();
00286 };
00287 
00288 #endif

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