00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011
00012
00013 #ifndef _EBLEVELADVECT_H_
00014 #define _EBLEVELADVECT_H_
00015
00016 #include "EBCellFAB.H"
00017 #include "DisjointBoxLayout.H"
00018 #include "LevelData.H"
00019 #include "PiecewiseLinearFillPatch.H"
00020 #include "EBPWLFillPatch.H"
00021 #include "EBFluxRegister.H"
00022 #include "ProblemDomain.H"
00023 #include "EBPatchGodunovFactory.H"
00024 #include "EBPatchAdvect.H"
00025 #include "NamespaceHeader.H"
00026
00028
00031 class EBLevelAdvect
00032 {
00033 public:
00035
00038 EBLevelAdvect();
00039
00041
00045 ~EBLevelAdvect();
00046
00047 EBLevelAdvect(const DisjointBoxLayout& a_thisDBL,
00048 const DisjointBoxLayout& a_coarDBL,
00049 const EBISLayout& a_thisEBISL,
00050 const EBISLayout& a_coarEBISL,
00051 const ProblemDomain& a_DProblem,
00052 const int& a_nRefine,
00053 const RealVect& a_dx,
00054 const bool& a_hasCoarser,
00055 const bool& a_hasFiner,
00056 const EBPatchGodunovFactory* const a_patchGodunov);
00057
00059
00068 void define(const DisjointBoxLayout& a_thisDBL,
00069 const DisjointBoxLayout& a_coarDBL,
00070 const EBISLayout& a_thisEBISL,
00071 const EBISLayout& a_coarEBISL,
00072 const ProblemDomain& a_DProblem,
00073 const int& a_nRefine,
00074 const RealVect& a_dx,
00075 const bool& a_hasCoarser,
00076 const bool& a_hasFiner,
00077 const EBPatchGodunovFactory* const a_patchGodunov);
00078
00080
00092 void
00093 advectToFacesCol(LevelData< EBFluxFAB >& a_extrapState,
00094 LayoutData< Vector< BaseIVFAB<Real>* > >& a_coveredPrimLo,
00095 LayoutData< Vector< BaseIVFAB<Real>* > >& a_coveredPrimHi,
00096 const LayoutData< Vector< Vector<VolIndex> > >& a_coveredFaceLo,
00097 const LayoutData< Vector< Vector<VolIndex> > >& a_coveredFaceHi,
00098 const LayoutData< Vector< IntVectSet> >& a_coveredSetsLo,
00099 const LayoutData< Vector< IntVectSet> >& a_coveredSetsHi,
00100 const LevelData< EBCellFAB >& a_consState,
00101 const LevelData< EBCellFAB >& a_normalVel,
00102 const LevelData< EBFluxFAB >& a_advectionVel,
00103 const LevelData< EBCellFAB >* a_consStateCoarseOld,
00104 const LevelData< EBCellFAB >* a_consStateCoarseNew,
00105 const LevelData< EBCellFAB >* a_normalVelCoarseOld,
00106 const LevelData< EBCellFAB >* a_normalVelCoarseNew,
00107 const Real& a_timeCoarseOld,
00108 const Real& a_timeCoarseNew,
00109 const Real& a_timeFine,
00110 const Real& a_dt,
00111 const LevelData<EBCellFAB>* const a_source = NULL);
00112
00113
00114
00115 void
00116 advectToFaces(EBFluxFAB& a_extrapState,
00117 BaseIVFAB<Real>& a_boundaryPrim,
00118 Vector< BaseIVFAB<Real>* >& a_coveredPrimLo,
00119 Vector< BaseIVFAB<Real>* >& a_coveredPrimHi,
00120 const Vector< Vector<VolIndex> >& a_coveredFaceLo,
00121 const Vector< Vector<VolIndex> >& a_coveredFaceHi,
00122 const Vector< IntVectSet >& a_coveredSetsLo,
00123 const Vector< IntVectSet >& a_coveredSetsHi,
00124 const EBCellFAB & a_consState,
00125 const EBCellFAB & a_normalVel,
00126 const EBFluxFAB & a_advectionVel,
00127 const Box& a_cellBox,
00128 const EBISBox& a_ebisBox,
00129 const Real& a_dt,
00130 const Real& a_time,
00131 const EBCellFAB & a_source,
00132 const DataIndex& a_dit,
00133 bool a_doBoundaryPrim);
00134
00135
00136
00137 void
00138 computeNormalVel(LevelData<EBCellFAB>& a_normalVel,
00139 const LevelData<EBFluxFAB>& a_advectionVel,
00140 const LayoutData<Vector<BaseIVFAB<Real> * > >& a_coveredVeloLo,
00141 const LayoutData<Vector<BaseIVFAB<Real> * > >& a_coveredVeloHi,
00142 const LayoutData<Vector<Vector<VolIndex> > >& a_coveredFaceLo,
00143 const LayoutData<Vector<Vector<VolIndex> > >& a_coveredFaceHi) const;
00144
00145 bool isDefined() const;
00146
00147 EBPatchAdvect& getPatchAdvect(const DataIndex& a_dit)
00148 {
00149 return *m_ebPatchAdvect[a_dit];
00150 }
00151 void resetBCs(const RefCountedPtr<EBPhysIBCFactory>& a_advectBC);
00152 protected:
00153
00154 bool m_hasCoarser;
00155 bool m_hasFiner;
00156 bool m_isDefined;
00157 RealVect m_dx;
00158 int m_refRatCrse;
00159 int m_nVar;
00160 int m_nGhost;
00161
00162 DisjointBoxLayout m_thisGrids;
00163 DisjointBoxLayout m_coarGrids;
00164 EBISLayout m_thisEBISL;
00165 EBISLayout m_coarEBISL;
00166 EBPWLFillPatch m_fillPatch;
00167 EBPWLFillPatch m_fillPatchVel;
00168 ProblemDomain m_domain;
00169 LayoutData<EBPatchAdvect*> m_ebPatchAdvect;
00170
00171 private:
00172
00173 void operator=(const EBLevelAdvect& a_input)
00174 {
00175 MayDay::Error("invalid operator");
00176 }
00177 EBLevelAdvect(const EBLevelAdvect& a_input)
00178 {
00179 MayDay::Error("invalid operator");
00180 }
00181 };
00182
00183 #include "NamespaceFooter.H"
00184 #endif