00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _SLOWEBCOFACTORY_H_
00012 #define _SLOWEBCOFACTORY_H_
00013
00014 #include "REAL.H"
00015 #include "Box.H"
00016 #include "FArrayBox.H"
00017 #include "Vector.H"
00018 #include <map>
00019 #include "RefCountedPtr.H"
00020
00021 #include "AMRMultiGrid.H"
00022
00023 #include "EBIndexSpace.H"
00024 #include "EBCellFAB.H"
00025 #include "EBCellFactory.H"
00026 #include "slowEBCO.H"
00027 #include "EBLevelDataOps.H"
00028 #include "BaseEBBC.H"
00029 #include "BaseDomainBC.H"
00030 #include "CFIVS.H"
00031 #include "EBFluxRegister.H"
00032 #include "EBMGAverage.H"
00033 #include "EBMGInterp.H"
00034 #include "EBCoarsen.H"
00035 #include "PolyGeom.H"
00036 #include "EBAMRPoissonOp.H"
00037 #include "EBLevelGrid.H"
00038 #include "NamespaceHeader.H"
00039
00040
00041
00042
00043
00044
00045 class slowEBCOFactory: public AMRLevelOpFactory<LevelData<EBCellFAB> >
00046 {
00047 public:
00048
00049
00050 virtual ~slowEBCOFactory();
00051
00052
00053
00054
00055 slowEBCOFactory(const Vector<EBLevelGrid>& a_eblgs,
00056 const Vector<RefCountedPtr<EBQuadCFInterp> >& a_quadCFI,
00057 const Real& a_alpha,
00058 const Real & a_beta,
00059 const Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_acoef,
00060 const Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_bcoef,
00061 const Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > >& a_bcoefIrreg,
00062 const Real& a_dxCoarse,
00063 const Vector<int>& a_refRatio,
00064 const RefCountedPtr<BaseDomainBCFactory>& a_domainBCFactory,
00065 const RefCountedPtr<BaseEBBCFactory> & a_ebBcFactory,
00066 const IntVect& a_ghostCellsPhi,
00067 const IntVect& a_ghostCellsRhs,
00068 const int& a_relaxType,
00069 int a_numLevels = -1);
00070
00071
00072 virtual slowEBCO*
00073 MGnewOp(const ProblemDomain& a_FineindexSpace,
00074 int a_depth,
00075 bool a_homoOnly = true);
00076
00077 slowEBCO* createOperator(const EBLevelGrid& a_eblgMGLevel,
00078 const EBLevelGrid& a_eblgCoarMG,
00079 const bool& a_hasMGObjects,
00080 const RealVect& a_dxMGLevel,
00081 const RealVect& a_dxCoar,
00082 const int& a_whichLevel);
00083
00084 virtual void reclaim(MGLevelOp<LevelData<EBCellFAB> >* a_reclaim);
00085
00086
00087 virtual slowEBCO*
00088 AMRnewOp(const ProblemDomain& a_FineindexSpace);
00089
00090
00091 virtual void AMRreclaim(slowEBCO* a_reclaim);
00092
00093
00094
00095
00096 virtual int refToFiner(const ProblemDomain& a_domain) const;
00097
00098
00099 void resetCoefficients(const Real& a_alpha,
00100 const Real & a_beta,
00101 const Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_acoef,
00102 const Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_bcoef,
00103 const Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > >& a_bcoefIrreg)
00104 {
00105 m_alpha = a_alpha ;
00106 m_beta = a_beta ;
00107 m_acoef = a_acoef ;
00108 m_bcoef = a_bcoef ;
00109 m_bcoefIrreg = a_bcoefIrreg ;
00110 }
00111
00112 protected:
00113
00114 Vector< Vector<EBLevelGrid> > m_eblgsMG;
00115 Vector< Vector< RefCountedPtr<LevelData<EBCellFAB> > > > m_acoefMG;
00116 Vector< Vector< RefCountedPtr<LevelData<EBFluxFAB> > > > m_bcoefMG;
00117 Vector< Vector< RefCountedPtr<LevelData<BaseIVFAB<Real> > > > > m_bcoefIrregMG;
00118
00119 int m_relaxType;
00120 Vector<EBLevelGrid> m_eblgs;
00121 Vector<RefCountedPtr<EBQuadCFInterp> > m_quadCFI;
00122 Real m_alpha;
00123 Real m_beta;
00124 Vector<RefCountedPtr<LevelData<EBCellFAB> > > m_acoef;
00125 Vector<RefCountedPtr<LevelData<EBFluxFAB> > > m_bcoef;
00126 Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > > m_bcoefIrreg;
00127 Real m_dxCoarse;
00128 Vector<int> m_refRatio;
00129 RefCountedPtr<BaseDomainBCFactory> m_domainBCFactory;
00130 RefCountedPtr<BaseEBBCFactory> m_ebBCFactory;
00131 IntVect m_ghostCellsPhi;
00132 IntVect m_ghostCellsRhs;
00133 int m_numLevels;
00134 std::vector< bool > m_hasMGObjects;
00135 Vector<Real> m_dx;
00136 private:
00137
00138 slowEBCOFactory()
00139 {
00140 MayDay::Error("invalid operator");
00141 }
00142
00143
00144 slowEBCOFactory(const slowEBCOFactory& a_opin)
00145 {
00146 MayDay::Error("invalid operator");
00147 }
00148
00149
00150 void operator=(const slowEBCOFactory& a_opin)
00151 {
00152 MayDay::Error("invalid operator");
00153 }
00154 };
00155
00156 #include "NamespaceFooter.H"
00157 #endif