00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _EB_PWL_FILL_PATCH_H_
00030 #define _EB_PWL_FILL_PATCH_H_
00031
00032 #include "REAL.H"
00033 #include "FArrayBox.H"
00034 #include "LevelData.H"
00035 #include "DisjointBoxLayout.H"
00036 #include "EBISLayout.H"
00037 #include "EBCellFAB.H"
00038 #include "Interval.H"
00039 #include "Stencils.H"
00040 #include "BaseIVFAB.H"
00041
00043
00048 class EBPWLFillPatch
00049 {
00050 public:
00052
00055 EBPWLFillPatch();
00056
00058 ~EBPWLFillPatch();
00059
00061
00076 EBPWLFillPatch(const DisjointBoxLayout& a_dblFine,
00077 const DisjointBoxLayout& a_dblCoar,
00078 const EBISLayout& a_ebislFine,
00079 const EBISLayout& a_ebislCoar,
00080 const Box& a_domainCoar,
00081 const int& a_nref,
00082 const int& a_nvar,
00083 const int& a_radius);
00084
00086
00100 void define(const DisjointBoxLayout& a_dblFine,
00101 const DisjointBoxLayout& a_dblCoar,
00102 const EBISLayout& a_ebislFine,
00103 const EBISLayout& a_ebislCoar,
00104 const Box& a_domainCoar,
00105 const int& a_nref,
00106 const int& a_nvar,
00107 const int& a_radius);
00108
00110
00114 bool isDefined() const;
00115
00117
00132 void
00133 interpolate(LevelData<EBCellFAB>& a_fineData,
00134 const LevelData<EBCellFAB>& a_coarDataOld,
00135 const LevelData<EBCellFAB>& a_coarDataNew,
00136 const Real& a_coarTimeOld,
00137 const Real& a_coarTimeNew,
00138 const Real& a_fineTime,
00139 const Interval& a_variables);
00140
00141 protected:
00142
00143
00144 void
00145 interpolateFAB(EBCellFAB& a_fine,
00146 const EBCellFAB& a_coarOld,
00147 const EBCellFAB& a_coarNew,
00148 const Real& a_coarTimeOld,
00149 const Real& a_coarTimeNew,
00150 const Real& a_fineTime,
00151 const DataIndex& a_datInd,
00152 const Interval& a_variables) const;
00153
00154 void
00155 makeStencils();
00156
00157 void setDefaultValues();
00158
00159 bool m_isDefined;
00160
00161 bool extractFromSten(Real& a_value,
00162 const VoFStencil& a_vofsten,
00163 const EBCellFAB& a_coarData,
00164 const int& ivar) const;
00165
00166 Real computeDMinMod(const BaseIVFAB<VoFStencil >& a_lostenBF,
00167 const BaseIVFAB<VoFStencil >& a_histenBF,
00168 const VolIndex& a_coarVoF,
00169 const EBCellFAB& a_coarData,
00170 const int& ivar,
00171 const IntVectSet& loInterpSet,
00172 const IntVectSet& hiInterpSet,
00173 const IntVectSet& ceInterpSet) const;
00174
00175
00176 Box m_coarDomain;
00177 DisjointBoxLayout m_coarsenedFineGrids;
00178 DisjointBoxLayout m_fineGrids;
00179 DisjointBoxLayout m_coarGrids;
00180 EBISLayout m_coarsenedFineEBISL;
00181 EBISLayout m_fineEBISL;
00182
00183 LevelData<EBCellFAB> m_coarsenedFineData;
00184 LevelData<EBCellFAB> m_coarOnFDataOld;
00185 LevelData<EBCellFAB> m_coarOnFDataNew;
00186
00187 int m_refRat;
00188 int m_nComp;
00189 int m_radius;
00190 int m_coarGhostRad;
00191
00192
00193
00194 LayoutData<IntVectSet> m_irregRegionsFine;
00195
00196
00197
00198
00199 LayoutData<BaseIVFAB<VoFStencil> > m_hiStencils[SpaceDim];
00200 LayoutData<BaseIVFAB<VoFStencil> > m_loStencils[SpaceDim];
00201
00202
00203
00204
00205
00206 LayoutData<IntVectSet> m_coarCeInterp[SpaceDim];
00207 LayoutData<IntVectSet> m_coarLoInterp[SpaceDim];
00208 LayoutData<IntVectSet> m_coarHiInterp[SpaceDim];
00209
00210 private:
00211
00212 EBPWLFillPatch(const EBPWLFillPatch& ebcin)
00213 {
00214 MayDay::Error("ebpwl 2 invalid operator");
00215 }
00216 void operator=(const EBPWLFillPatch& fabin)
00217 {
00218 MayDay::Error("ebpwl 3 invalid operator");
00219 }
00220 };
00221
00222 #endif