00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _EBAMRPOISSONOPFACTORY_H_
00012 #define _EBAMRPOISSONOPFACTORY_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
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
00042
00045 class EBAMRPoissonOpFactory: public AMRLevelOpFactory<LevelData<EBCellFAB> >
00046 {
00047 public:
00049 virtual ~EBAMRPoissonOpFactory();
00050
00052
00070 EBAMRPoissonOpFactory(const Vector<EBLevelGrid>& a_eblgs,
00071 const Vector<int>& a_refRatio,
00072 const Vector<RefCountedPtr<EBQuadCFInterp> >& a_quadCFI,
00073 const RealVect& a_dxCoarse,
00074 const RealVect& a_origin,
00075 const int& a_numPreCondIters,
00076 const int& a_relaxType,
00077 RefCountedPtr<BaseDomainBCFactory> a_domainBCFactory,
00078 RefCountedPtr<BaseEBBCFactory> a_ebBcFactory,
00079 const Real& a_alpha,
00080 const Real& a_beta,
00081 const Real& a_time,
00082 const IntVect& a_ghostCellsPhi,
00083 const IntVect& a_ghostCellsRhs,
00084 int a_numLevels = -1);
00085
00087 virtual EBAMRPoissonOp*
00088 MGnewOp(const ProblemDomain& a_FineindexSpace,
00089 int a_depth,
00090 bool a_homoOnly = true);
00091
00092 EBAMRPoissonOp* createOperator(const EBLevelGrid& a_eblgMGLevel,
00093 const EBLevelGrid& a_eblgCoarMG,
00094 const bool& a_hasMGObjects,
00095 const bool& a_layoutChanged,
00096 const RealVect& a_dxMGLevel,
00097 const RealVect& a_dxCoar,
00098 RefCountedPtr<EBQuadCFInterp>& a_quadCFIMGLevel,
00099 const int& a_whichLevel);
00101 virtual void reclaim(MGLevelOp<LevelData<EBCellFAB> >* a_reclaim);
00102
00104 virtual EBAMRPoissonOp*
00105 AMRnewOp(const ProblemDomain& a_FineindexSpace);
00106
00108 virtual void AMRreclaim(EBAMRPoissonOp* a_reclaim);
00109
00111
00113 virtual int refToFiner(const ProblemDomain& a_domain) const;
00114
00115 protected:
00116 bool m_isDefined;
00117 int m_numPreCondIters;
00118 int m_relaxType;
00119 int m_numLevels;
00120
00121
00122 Vector<EBLevelGrid> m_eblgVec;
00123 Vector<RefCountedPtr<EBQuadCFInterp> > m_quadCFIVec;
00124
00125 Vector< Vector<EBLevelGrid> > m_eblgVecMG;
00126 std::vector< bool > m_hasMGObjects;
00127 std::vector< bool > m_layoutChanged;
00128 std::vector< std::vector<bool> > m_layoutChangedMG;
00129
00130 Vector<int> m_refRatioVec;
00131 Vector<RealVect> m_dxVec;
00132 RealVect m_origin;
00133 Real m_alpha;
00134 Real m_beta;
00135 Real m_time;
00136 const IntVect m_ghostCellsPhi;
00137 const IntVect m_ghostCellsRHS;
00138
00139 RefCountedPtr<BaseDomainBCFactory> m_domainBCFactory;
00140 RefCountedPtr<BaseEBBCFactory> m_ebBCFactory;
00141
00142 private:
00144 EBAMRPoissonOpFactory()
00145 {
00146 MayDay::Error("invalid operator");
00147 }
00148
00149
00150 EBAMRPoissonOpFactory(const EBAMRPoissonOpFactory& a_opin)
00151 {
00152 MayDay::Error("invalid operator");
00153 }
00154
00155 void operator=(const EBAMRPoissonOpFactory& a_opin)
00156 {
00157 MayDay::Error("invalid operator");
00158 }
00159 };
00160
00161 #include "NamespaceFooter.H"
00162 #endif