00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _EBVISCOUSTENSOROPFACTORY_H_
00012 #define _EBVISCOUSTENSOROPFACTORY_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 "EBViscousTensorOp.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
00042
00045 class EBViscousTensorOpFactory: public AMRLevelOpFactory<LevelData<EBCellFAB> >
00046 {
00047 public:
00048
00050 virtual ~EBViscousTensorOpFactory();
00051
00053
00055 EBViscousTensorOpFactory(const Vector<EBLevelGrid>& a_eblgs,
00056 const Real& a_alpha,
00057 const Real & a_beta,
00058 const Vector<RefCountedPtr<LevelData<EBCellFAB> > >& a_acoef,
00059 const Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_eta,
00060 const Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_lambda,
00061 const Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > >& a_etaIrreg,
00062 const Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > >& a_lambdaIrreg,
00063 const Real& a_dxCoarse,
00064 const Vector<int>& a_refRatio,
00065 const RefCountedPtr<BaseDomainBCFactory>& a_domainBCFactory,
00066 const RefCountedPtr<BaseEBBCFactory> & a_ebBcFactory,
00067 const IntVect& a_ghostCellsPhi,
00068 const IntVect& a_ghostCellsRhs,
00069 int a_numLevels = -1);
00070
00072 virtual EBViscousTensorOp*
00073 MGnewOp(const ProblemDomain& a_FineindexSpace,
00074 int a_depth,
00075 bool a_homoOnly = true);
00076
00077 EBViscousTensorOp* 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);
00084 virtual void reclaim(MGLevelOp<LevelData<EBCellFAB> >* a_reclaim);
00085
00087 virtual EBViscousTensorOp*
00088 AMRnewOp(const ProblemDomain& a_FineindexSpace);
00089
00091 virtual void AMRreclaim(EBViscousTensorOp* a_reclaim);
00092
00094
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_eta,
00103 const Vector<RefCountedPtr<LevelData<EBFluxFAB> > >& a_lambda,
00104 const Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > >& a_etaIrreg,
00105 const Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > >& a_lambdaIrreg)
00106 {
00107 m_alpha = a_alpha ;
00108 m_beta = a_beta ;
00109 m_acoef = a_acoef ;
00110 m_eta = a_eta ;
00111 m_lambda = a_lambda ;
00112 m_etaIrreg = a_etaIrreg ;
00113 m_lambdaIrreg = a_lambdaIrreg;
00114 }
00115
00116 protected:
00117 Vector< Vector<EBLevelGrid> > m_eblgsMG;
00118 Vector< Vector<RefCountedPtr<LevelData<EBCellFAB> > > > m_acoefMG;
00119 Vector< Vector<RefCountedPtr<LevelData<EBFluxFAB> > > > m_etaMG;
00120 Vector< Vector<RefCountedPtr<LevelData<EBFluxFAB> > > > m_lambdaMG;
00121 Vector< Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > > > m_etaIrregMG;
00122 Vector< Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > > > m_lambdaIrregMG;
00123 std::vector< bool > m_hasMGObjects;
00124
00125 Vector<EBLevelGrid> m_eblgs;
00126 Real m_alpha;
00127 Real m_beta;
00128 Vector<RefCountedPtr<LevelData<EBCellFAB> > > m_acoef;
00129 Vector<RefCountedPtr<LevelData<EBFluxFAB> > > m_eta;
00130 Vector<RefCountedPtr<LevelData<EBFluxFAB> > > m_lambda;
00131 Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > > m_etaIrreg;
00132 Vector<RefCountedPtr<LevelData<BaseIVFAB<Real> > > > m_lambdaIrreg;
00133 Real m_dxCoarse;
00134 Vector<int> m_refRatio;
00135 RefCountedPtr<BaseDomainBCFactory> m_domainBCFactory;
00136 RefCountedPtr<BaseEBBCFactory> m_ebBCFactory;
00137 IntVect m_ghostCellsPhi;
00138 IntVect m_ghostCellsRhs;
00139 int m_numLevels;
00140 Vector<Real> m_dx;
00141 private:
00143 EBViscousTensorOpFactory()
00144 {
00145 MayDay::Error("invalid operator");
00146 }
00147
00148
00149 EBViscousTensorOpFactory(const EBViscousTensorOpFactory& a_opin)
00150 {
00151 MayDay::Error("invalid operator");
00152 }
00153
00154
00155 void operator=(const EBViscousTensorOpFactory& a_opin)
00156 {
00157 MayDay::Error("invalid operator");
00158 }
00159 };
00160
00161 #include "NamespaceFooter.H"
00162 #endif