00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _EBPATCHGODUNOV_H_
00012 #define _EBPATCHGODUNOV_H_
00013
00014 #include "Box.H"
00015 #include "IntVectSet.H"
00016 #include "Vector.H"
00017 #include "CH_HDF5.H"
00018 #include "EBCellFAB.H"
00019 #include "EBFluxFAB.H"
00020 #include "EBISBox.H"
00021 #include "BaseIVFAB.H"
00022 #include "EBPhysIBC.H"
00023 #include "EBPhysIBCFactory.H"
00024 #include "Stencils.H"
00025 #include "AggStencil.H"
00026 #include "NamespaceHeader.H"
00027
00028
00029
00030
00031 class EBPatchGodunov
00032 {
00033 public:
00034
00035
00036
00037 EBPatchGodunov();
00038
00039
00040 void
00041 incrementWithSource(EBCellFAB& a_primState,
00042 const EBCellFAB& a_source,
00043 const Real& a_scale,
00044 const Box& a_box) ;
00045
00046
00047 virtual void
00048 extrapToCoveredFaces(BaseIVFAB<Real>& a_extendedPrim,
00049 const EBCellFAB& a_primMinu,
00050 const EBCellFAB& a_primPlus,
00051 const EBCellFAB& a_primState,
00052 const Vector<VolIndex>& a_coveredFaces,
00053 const int& a_faceDir,
00054 const Side::LoHiSide& a_sd,
00055 const Box& a_box);
00056
00057
00058 virtual void
00059 pointExtrapToCovered2D(Vector<Real>& a_extrapVal,
00060 const EBCellFAB& a_primMinu,
00061 const EBCellFAB& a_primPlus,
00062 const EBCellFAB& a_primState,
00063 const int& a_faceDir,
00064 const VolIndex& a_vof,
00065 const RealVect& a_normal,
00066 const Side::LoHiSide& a_sd,
00067 const int& a_numPrim);
00068
00069
00070 virtual void
00071 pointExtrapToCovered3D(Vector<Real>& a_extrapVal,
00072 const EBCellFAB& a_primMinu,
00073 const EBCellFAB& a_primPlus,
00074 const EBCellFAB& a_primState,
00075 const int& a_faceDir,
00076 const VolIndex& a_vof,
00077 const RealVect& a_normal,
00078 const Side::LoHiSide& a_sd,
00079 const int& a_numPrim);
00080
00081
00082 void
00083 computeCoveredFaces(Vector<VolIndex>& a_coveredFace,
00084 IntVectSet& a_coveredIVS,
00085 IntVectSet& a_irregIVS,
00086 const int& a_idir,
00087 const Side::LoHiSide& a_sd,
00088 const Box& a_region);
00089
00090
00091
00092 const EBPhysIBC* getEBPhysIBC() const;
00093
00094
00095
00096
00097 Real
00098 pointLimiter(const Real& a_deltaW1,
00099 const Real& a_deltaW2);
00100
00101
00102
00103
00104 void
00105 setEBPhysIBC(const EBPhysIBCFactory& a_bc);
00106
00107
00108
00109
00110 void setSlopeParameters(bool a_fourthOrderSlopes,
00111 bool a_flattening,
00112 bool a_useLimiting);
00113
00114
00115
00116
00117
00118
00119
00120
00121 void
00122 applyLimiter(EBCellFAB& a_slopePrim,
00123 const EBCellFAB& a_slopePrimLeft,
00124 const EBCellFAB& a_slopePrimRigh,
00125 const int& a_dir,
00126 const Box& a_box);
00127
00128 virtual void
00129 doSecondOrderSlopes(EBCellFAB& a_delta2W,
00130 EBCellFAB& a_deltaWL,
00131 EBCellFAB& a_deltaWR,
00132 EBCellFAB& a_deltaWC,
00133 const EBCellFAB& a_primState,
00134 const int& a_dir,
00135 const Box& a_box,
00136 bool a_doAggregated = false);
00137
00138 virtual void
00139 aggIrregSecondOrderSlopes(EBCellFAB& a_delta2W,
00140 EBCellFAB& a_deltaWL,
00141 EBCellFAB& a_deltaWR,
00142 EBCellFAB& a_deltaWC,
00143 const EBCellFAB& a_primState,
00144 const int& a_dir,
00145 const Box& a_box);
00146
00147
00148 virtual void
00149 irregSecondOrderSlopes(EBCellFAB& a_delta2W,
00150 EBCellFAB& a_deltaWL,
00151 EBCellFAB& a_deltaWR,
00152 EBCellFAB& a_deltaWC,
00153 const EBCellFAB& a_primState,
00154 const int& a_dir,
00155 const Box& a_box);
00156
00157 void
00158 doFourthOrderSlopes(EBCellFAB& a_delta4W,
00159 EBCellFAB& a_deltaWC,
00160 const EBCellFAB& a_delta2W,
00161 const EBCellFAB& a_deltaWL,
00162 const EBCellFAB& a_deltaWR,
00163 const EBCellFAB& a_primState,
00164 const int& a_dir,
00165 const Box& a_box);
00166 void
00167 pointGetSlopes(Real& a_dql,
00168 Real& a_dqr,
00169 Real& a_dqc,
00170 bool& a_hasFacesLeft,
00171 bool& a_hasFacesRigh,
00172 const VolIndex& a_vof,
00173 const EBCellFAB& a_primState,
00174 const int& a_dir,
00175 const int& a_ivar,
00176 const bool& a_verbose);
00177
00178 virtual void
00179 coveredExtrapSlopes(Real& a_dqc,
00180 const VolIndex& a_vof,
00181 const EBCellFAB& a_primState,
00182 const int& a_dir,
00183 const int& a_ivar);
00184
00185
00186
00187
00188 void
00189 computeFluxes(EBFluxFAB& a_flux,
00190 BaseIVFAB<Real> a_coveredFluxLo[SpaceDim],
00191 BaseIVFAB<Real> a_coveredFluxHi[SpaceDim],
00192 Vector<VolIndex> a_coveredFaceLo[SpaceDim],
00193 Vector<VolIndex> a_coveredFaceHi[SpaceDim],
00194 EBCellFAB& a_primState,
00195 EBCellFAB a_slopesPrim[SpaceDim],
00196 EBCellFAB a_slopesSeco[SpaceDim],
00197 const EBCellFAB& a_flattening,
00198 const EBCellFAB& a_consState,
00199 const EBCellFAB& a_source,
00200 const Box& a_box,
00201 const DataIndex& a_dit,
00202 bool a_verbose);
00203
00204
00205
00206
00207 virtual void
00208 extrapolatePrim2D(EBCellFAB a_primMinu[SpaceDim],
00209 EBCellFAB a_primPlus[SpaceDim],
00210 EBCellFAB& a_primState,
00211 EBCellFAB a_slopesPrim[SpaceDim],
00212 EBCellFAB a_slopesSeco[SpaceDim],
00213 const EBCellFAB& a_flattening,
00214 const EBCellFAB& a_consState,
00215 const EBCellFAB& a_source,
00216 const Box& a_box,
00217 const DataIndex& a_dit,
00218 bool a_verbose);
00219
00220
00221
00222
00223 void
00224 extrapolatePrim3D(EBCellFAB a_primMinu[SpaceDim],
00225 EBCellFAB a_primPlus[SpaceDim],
00226 EBCellFAB& a_primState,
00227 EBCellFAB a_slopesPrim[SpaceDim],
00228 EBCellFAB a_slopesSeco[SpaceDim],
00229 const EBCellFAB& a_flattening,
00230 const EBCellFAB& a_consState,
00231 const EBCellFAB& a_source,
00232 const Box& a_box,
00233 const DataIndex& a_dit,
00234 bool a_verbose);
00235
00236
00237
00238
00239
00240
00241
00242
00243 virtual void
00244 regularUpdate(EBCellFAB& a_consState,
00245 EBFluxFAB& a_flux,
00246 BaseIVFAB<Real>& a_ebIrregFlux,
00247 BaseIVFAB<Real>& a_nonConservativeDivergence,
00248 const EBCellFAB& a_flattening,
00249 const EBCellFAB& a_source,
00250 const Box& a_box,
00251 const IntVectSet& a_ivs,
00252 const DataIndex& a_dit,
00253 bool a_verbose);
00254
00255 virtual void
00256 regularDivergences(EBCellFAB& a_nonconsdiv,
00257 EBCellFAB& a_consState,
00258 EBFluxFAB& a_flux,
00259 BaseIVFAB<Real>& a_ebIrregFlux,
00260 BaseIVFAB<Real>& a_nonConservativeDivergence,
00261 const EBCellFAB& a_flattening,
00262 const EBCellFAB& a_source,
00263 const Box& a_box,
00264 const IntVectSet& a_ivs,
00265 const DataIndex& a_dit,
00266 bool a_verbose);
00267
00268 virtual void
00269 hybridDivergence(EBCellFAB& a_hybridDiv,
00270 EBCellFAB& a_consState,
00271 BaseIVFAB<Real>& a_massDiff,
00272 const BaseIFFAB<Real> a_centroidFlux[SpaceDim],
00273 const BaseIVFAB<Real>& a_ebIrregFlux,
00274 const BaseIVFAB<Real>& a_nonConservativeDivergence,
00275 const Box& a_box,
00276 const IntVectSet& a_ivs);
00277
00278
00279
00280
00281
00282
00283 virtual void
00284 irregularUpdate(EBCellFAB& a_consState,
00285 Real& a_maxWaveSpeed,
00286 BaseIVFAB<Real>& a_massDiff,
00287 const BaseIFFAB<Real> a_centroidFlux[SpaceDim],
00288 const BaseIVFAB<Real>& a_ebIrregFlux,
00289 const BaseIVFAB<Real>& a_nonConservativeDivergence,
00290 const Box& a_box,
00291 const IntVectSet& a_ivs);
00292
00293
00294
00295
00296 virtual void
00297 doNormalDerivativeExtr2D(EBCellFAB a_primMinu[SpaceDim],
00298 EBCellFAB a_primPlus[SpaceDim],
00299 EBFaceFAB a_fluxOne[SpaceDim],
00300 BaseIVFAB<Real> a_coveredFluxNormMinu[SpaceDim],
00301 BaseIVFAB<Real> a_coveredFluxNormPlus[SpaceDim],
00302 Vector<VolIndex> a_coveredFaceNormMinu[SpaceDim],
00303 Vector<VolIndex> a_coveredFaceNormPlus[SpaceDim],
00304 EBCellFAB a_slopesPrim[SpaceDim],
00305 EBCellFAB a_slopesSeco[SpaceDim],
00306 const EBCellFAB& a_flattening,
00307 const EBCellFAB& a_primState,
00308 const EBCellFAB& a_source,
00309 const DataIndex& a_dit,
00310 const Box& a_box);
00311
00312
00313
00314
00315 void
00316 doNormalDerivativeExtr3D(EBCellFAB a_primMinu[SpaceDim],
00317 EBCellFAB a_primPlus[SpaceDim],
00318 EBFaceFAB a_fluxOne[SpaceDim],
00319 BaseIVFAB<Real> a_coveredFluxNormMinu[SpaceDim],
00320 BaseIVFAB<Real> a_coveredFluxNormPlus[SpaceDim],
00321 Vector<VolIndex> a_coveredFaceNormMinu[SpaceDim],
00322 Vector<VolIndex> a_coveredFaceNormPlus[SpaceDim],
00323 EBCellFAB a_slopesPrim[SpaceDim],
00324 EBCellFAB a_slopesSeco[SpaceDim],
00325 const EBCellFAB& a_flattening,
00326 const EBCellFAB& a_primState,
00327 const EBCellFAB& a_source,
00328 const DataIndex& a_dit,
00329 const Box& a_box);
00330
00331
00332
00333
00334 virtual void
00335 finalExtrap2D(EBCellFAB a_primMinu[SpaceDim],
00336 EBCellFAB a_primPlus[SpaceDim],
00337 const BaseIVFAB<Real> a_coveredFluxNormMinu[SpaceDim],
00338 const BaseIVFAB<Real> a_coveredFluxNormPlus[SpaceDim],
00339 const Vector<VolIndex> a_coveredFaceNormMinu[SpaceDim],
00340 const Vector<VolIndex> a_coveredFaceNormPlus[SpaceDim],
00341 const EBFaceFAB a_fluxOne[SpaceDim],
00342 const EBCellFAB& a_primState,
00343 const EBCellFAB a_slopesPrim[SpaceDim],
00344 const EBCellFAB a_slopesSeco[SpaceDim],
00345 const Box& a_box);
00346
00347
00348
00349
00350 void
00351 finalExtrap3D(EBCellFAB a_primMinu[SpaceDim],
00352 EBCellFAB a_primPlus[SpaceDim],
00353 const BaseIVFAB<Real> a_coveredFlux3DMinu[SpaceDim][SpaceDim],
00354 const BaseIVFAB<Real> a_coveredFlux3DPlus[SpaceDim][SpaceDim],
00355 const EBFaceFAB a_fluxTwoVec[SpaceDim][SpaceDim],
00356 const EBCellFAB& a_primState,
00357 const EBCellFAB a_slopesPrim[SpaceDim],
00358 const EBCellFAB a_slopesSeco[SpaceDim],
00359 const Box& a_box);
00360
00361
00362
00363
00364 void
00365 do111coupling(EBFaceFAB a_fluxTwoVec[SpaceDim][SpaceDim],
00366 BaseIVFAB<Real> a_coveredFlux3DMinu[SpaceDim][SpaceDim],
00367 BaseIVFAB<Real> a_coveredFlux3DPlus[SpaceDim][SpaceDim],
00368 const EBCellFAB a_primMinu[SpaceDim],
00369 const EBCellFAB a_primPlus[SpaceDim],
00370 const BaseIVFAB<Real> a_coveredFluxNormMinu[SpaceDim],
00371 const BaseIVFAB<Real> a_coveredFluxNormPlus[SpaceDim],
00372 const Vector<VolIndex> a_coveredFaceNormMinu[SpaceDim],
00373 const Vector<VolIndex> a_coveredFaceNormPlus[SpaceDim],
00374 const EBFaceFAB a_fluxOne[SpaceDim],
00375 const EBCellFAB& a_primState,
00376 const EBCellFAB a_slopesPrim[SpaceDim],
00377 const EBCellFAB a_slopesSeco[SpaceDim],
00378 const DataIndex& a_dit,
00379 const Box& a_box);
00380
00381
00382
00383
00384 virtual void
00385 interpolateFluxToCentroids(BaseIFFAB<Real> a_centroidFlux[SpaceDim],
00386 const BaseIFFAB<Real>* const a_fluxInterpolant[SpaceDim],
00387 const IntVectSet& a_irregIVS);
00388
00389
00390
00391
00392 virtual void
00393 finalUpdate(EBCellFAB& a_consState,
00394 BaseIVFAB<Real>& a_massDiff,
00395 const BaseIVFAB<Real>& a_nonConsDivF,
00396 const BaseIVFAB<Real>& a_conservDivF,
00397 const IntVectSet& a_ivs);
00398
00399
00400 virtual void
00401 getFaceDivergence(EBFluxFAB& a_openDivU,
00402 const EBCellFAB& a_primState,
00403 const EBCellFAB a_slopePrim[SpaceDim],
00404 const Box& a_box,
00405 const IntVectSet& a_ivsIrreg);
00406
00407
00408 void artificialViscosity(bool a_useArtificialVisc);
00409
00410
00411 void
00412 applyArtificialViscosity(EBFluxFAB& a_openFlux,
00413 BaseIVFAB<Real> a_coveredFluxMinu[SpaceDim],
00414 BaseIVFAB<Real> a_coveredFluxPlus[SpaceDim],
00415 const Vector<VolIndex> a_coveredFaceMinu[SpaceDim],
00416 const Vector<VolIndex> a_coveredFacePlus[SpaceDim],
00417 const EBCellFAB& a_consState,
00418 const EBFluxFAB& a_divVel,
00419 const Box& a_box,
00420 const IntVectSet& a_ivsIrreg);
00421
00422 Real bilinearFunc(const Real a_WVal[2][2],
00423 const Real& a_xd1,
00424 const Real& a_xd2);
00425
00426 Real maxFunction(const Real a_WVal[2][2],
00427 const Real& a_xd1,
00428 const Real& a_xd2);
00429
00430
00431
00432
00433 void
00434 define(const ProblemDomain& a_domain,
00435 const RealVect& a_dx, bool a_useAgg = false);
00436
00437
00438
00439 void
00440 define(const ProblemDomain& a_domain,
00441 const Real& a_dx)
00442 {
00443 m_useAgg = false;
00444 RealVect dxVect = a_dx*RealVect::Unit;
00445 define(a_domain, dxVect);
00446 }
00447
00448 virtual void setTimeAndDt(const Real& a_time, const Real& a_dt)
00449 {
00450 m_time = a_time;
00451 m_dt = a_dt;
00452 }
00453
00454
00455
00456
00457
00458 virtual void
00459 setValidBox(const Box& a_validBox,
00460 const EBISBox& a_ebisBox,
00461 const IntVectSet& a_coarseFineIVS,
00462 const Real& a_time,
00463 const Real& a_dt);
00464
00465 void
00466 computeFlattening(EBCellFAB& a_flattening,
00467 const EBCellFAB& a_primState,
00468 const Box& a_box);
00469
00470
00471
00472
00473
00474
00475
00476 virtual void
00477 slope(EBCellFAB& a_slopePrim,
00478 EBCellFAB& a_slopeNLim,
00479 const EBCellFAB& a_primState,
00480 const EBCellFAB& a_flattening,
00481 const int& a_dir,
00482 const Box& a_box,
00483 bool a_doAggregated = false);
00484
00485
00486 virtual void
00487 nonconservativeDivergence(EBCellFAB& a_divF,
00488 const EBFluxFAB& a_flux,
00489 const BaseIVFAB<Real> a_coveredFluxMinu[SpaceDim],
00490 const BaseIVFAB<Real> a_coveredFluxPlus[SpaceDim],
00491 const Vector<VolIndex> a_coveredFaceMinu[SpaceDim],
00492 const Vector<VolIndex> a_coveredFacePlus[SpaceDim],
00493 const Box& a_box);
00494
00495
00496 virtual void
00497 updatePrim(EBCellFAB& a_primMinu,
00498 EBCellFAB& a_primPlus,
00499 const EBFaceFAB& a_flux,
00500 const BaseIVFAB<Real>& a_coveredFluxMinu,
00501 const BaseIVFAB<Real>& a_coveredFluxPlus,
00502 const Vector<VolIndex>& a_coveredFaceMinu,
00503 const Vector<VolIndex>& a_coveredFacePlus,
00504 const int& a_dir,
00505 const Box& a_box,
00506 const Real& a_scale) ;
00507
00508
00509 virtual void
00510 updateCons(EBCellFAB& a_consState,
00511 const EBFaceFAB& a_flux,
00512 const BaseIVFAB<Real>& a_coveredFluxMinu,
00513 const BaseIVFAB<Real>& a_coveredFluxPlus,
00514 const Vector<VolIndex>& a_coveredFaceMinu,
00515 const Vector<VolIndex>& a_coveredFacePlus,
00516 const int& a_dir,
00517 const Box& a_box,
00518 const Real& a_scale);
00519
00520
00521
00522
00523
00524 virtual Interval velocityInterval() const = 0;
00525
00526
00527
00528
00529 virtual void
00530 consUndividedDivergence(BaseIVFAB<Real>& a_divF,
00531 const BaseIFFAB<Real> a_centroidFlux[SpaceDim],
00532 const BaseIVFAB<Real>& a_ebIrregFlux,
00533 const IntVectSet& a_ivs);
00534
00535
00536
00537
00538 virtual void
00539 computeEBIrregFlux(BaseIVFAB<Real>& a_ebIrregFlux,
00540 const EBCellFAB& a_primState,
00541 const EBCellFAB a_slopePrim[SpaceDim],
00542 const IntVectSet& a_irregIVS,
00543 const EBCellFAB& a_source) = 0;
00544
00545
00546
00547
00548
00549 virtual int pressureIndex() const = 0;
00550
00551
00552
00553
00554
00555
00556
00557 virtual int bulkModulusIndex() const = 0;
00558
00559
00560
00561
00562 virtual ~EBPatchGodunov();
00563
00564
00565
00566
00567 virtual void
00568 setCoveredConsVals(EBCellFAB& a_consState)= 0;
00569
00570
00571
00572
00573 virtual Real
00574 getMaxWaveSpeed(const EBCellFAB& a_consState,
00575 const Box& a_box) = 0;
00576
00577
00578 virtual void
00579 floorConserved(EBCellFAB& a_consState,
00580 const Box& a_box) = 0;
00581
00582
00583 virtual void
00584 floorPrimitives(EBCellFAB& a_primState,
00585 const Box& a_box) = 0;
00586
00587
00588 virtual void
00589 floorConserved(BaseIVFAB<Real>& a_consState,
00590 const IntVectSet& a_ivs) = 0;
00591
00592
00593 virtual void
00594 floorPrimitives(BaseIVFAB<Real>& a_primState,
00595 const IntVectSet& a_ivs) = 0;
00596
00597
00598 virtual void getCoveredValuesPrim(Vector<Real>& a_covValues)=0;
00599
00600
00601 virtual void getCoveredValuesCons(Vector<Real>& a_covValues)=0;
00602
00603 virtual int densityIndex() const = 0;
00604
00605
00606
00607
00608
00609 virtual int numPrimitives() const = 0;
00610
00611
00612
00613
00614
00615 virtual int numFluxes() const = 0;
00616
00617
00618
00619
00620
00621 virtual int numSlopes() const = 0;
00622
00623
00624
00625
00626
00627 virtual int numConserved() const = 0;
00628
00629
00630
00631
00632
00633
00634 virtual Vector<string> stateNames()=0;
00635
00636
00637
00638
00639
00640
00641 virtual Vector<string> primNames()=0;
00642
00643 virtual void
00644 normalPred(EBCellFAB& a_primLo,
00645 EBCellFAB& a_primHi,
00646 const EBCellFAB& a_primState,
00647 const EBCellFAB& a_slopePrim,
00648 const Real& a_scale,
00649 const int& a_dir,
00650 const Box& a_box) = 0;
00651
00652
00653
00654
00655
00656
00657 virtual void
00658 riemann(EBFaceFAB& a_flux,
00659 const EBCellFAB& a_primLeft,
00660 const EBCellFAB& a_primRight,
00661 const int& a_dir,
00662 const Box& a_box) = 0;
00663
00664
00665
00666
00667
00668
00669 virtual void
00670 riemann(BaseIVFAB<Real>& a_coveredFlux,
00671 const BaseIVFAB<Real>& a_extendedState,
00672 const EBCellFAB& a_primState,
00673 const Vector<VolIndex>& a_region,
00674 const int& a_dir,
00675 const Side::LoHiSide& a_sd,
00676 const Box& a_box)= 0;
00677
00678
00679 virtual void
00680 setSource(EBCellFAB& a_source,
00681 const EBCellFAB& a_consState,
00682 const Box& a_box)
00683 {;}
00684
00685
00686 virtual void
00687 assembleFluxReg(EBFaceFAB& a_fluxRegFlux,
00688 const EBFaceFAB& a_godunovFlux,
00689 const int& a_idir,
00690 const Box& a_cellBox)
00691 {;}
00692
00693
00694 virtual void
00695 assembleFluxIrr(BaseIFFAB<Real>& a_fluxRegFlux,
00696 const BaseIFFAB<Real>& a_godunovFlux,
00697 const int& a_idir,
00698 const Box& a_cellBox,
00699 const IntVectSet& a_set)
00700 {;}
00701
00702
00703 virtual void
00704 consToPrim(EBCellFAB& a_primState,
00705 const EBCellFAB& a_conState,
00706 const Box& a_box,
00707 int a_logflag,
00708 bool a_verbose = false)=0;
00709
00710 #ifdef CH_USE_HDF5
00711 virtual void
00712 expressions(HDF5HeaderData& a_holder)
00713 {;}
00714 #endif
00715
00716
00717 virtual void
00718 consToPrim(BaseIVFAB<Real>& a_primState,
00719 const BaseIVFAB<Real>& a_conState,
00720 const IntVectSet& a_ivs) =0;
00721
00722
00723
00724
00725 virtual void
00726 primToCons(EBCellFAB& a_primState,
00727 const EBCellFAB& a_conState,
00728 const Box& a_box) = 0;
00729
00730
00731
00732
00733 virtual void
00734 primToCons(BaseIVFAB<Real>& a_primState,
00735 const BaseIVFAB<Real>& a_conState,
00736 const IntVectSet& a_ivs) = 0;
00737
00738
00739
00740
00741
00742 virtual bool usesFlattening() const = 0;
00743
00744
00745
00746
00747
00748 virtual bool usesArtificialViscosity() const = 0;
00749
00750
00751
00752
00753
00754
00755 virtual bool usesFourthOrderSlopes() const = 0;
00756
00757
00758
00759
00760
00761
00762 virtual Real artificialViscosityCoefficient() const = 0;
00763
00764
00765
00766
00767 virtual bool isDefined() const;
00768
00769
00770 static void setVerbose(bool a_verbose);
00771 static void setCurLevel(int a_curLevel);
00772 static void setCurComp(int a_curComp);
00773 static void setDoingVel(int a_yesorno);
00774 static void setDoingAdvVel(int a_yesorno);
00775 static int getDoingAdvVel();
00776 static int getDoingVel();
00777 static int getCurLevel();
00778 static int getCurComp();
00779 static bool getVerbose();
00780 static Real getMaxWaveSpeed();
00781 static void setMaxWaveSpeed(Real a_maxWaveSpeedIV);
00782 static IntVect getMaxWaveSpeedIV();
00783 static void setMaxWaveSpeedIV(const IntVect& a_maxWaveSpeedIV);
00784
00785 EBCellFAB& getPrimState()
00786 {
00787 return m_primState;
00788 }
00789 BaseIVFAB<Real>* getCoveredFluxPlus()
00790 {
00791 return m_coveredFluxPlusG4;
00792 }
00793 BaseIVFAB<Real>* getCoveredFluxMinu()
00794 {
00795 return m_coveredFluxMinuG4;
00796 }
00797
00798 Vector<VolIndex>* getCoveredFaceMinu()
00799 {
00800 return m_coveredFaceMinuG4;
00801 }
00802
00803 Vector<VolIndex>* getCoveredFacePlus()
00804 {
00805 return m_coveredFacePlusG4;
00806 }
00807 static IntVect s_debugIV;
00808 static int s_whichLev;
00809
00810
00811
00812
00813
00814
00815 static void useConservativeSource(bool a_conservativeSource)
00816 {
00817 s_conservativeSource = a_conservativeSource;
00818 }
00819
00820
00821 struct
00822 {
00823 int m_offset;
00824 bool m_multiValued;
00825 } typedef pointerOffset_t;
00826
00827 struct
00828 {
00829 pointerOffset_t m_vofOffset;
00830 } typedef updateStencil_t;
00831
00832
00833 void fillUpdateStencil(EBPatchGodunov::updateStencil_t& a_sten,
00834 const VolIndex& a_vof);
00835
00836
00837 void cacheEBCF(Vector<Vector<Real> >& a_cache,
00838 const EBCellFAB& a_input);
00839
00840
00841 void uncacheEBCF(EBCellFAB& a_output,
00842 const Vector<Vector<Real> >& a_cache);
00843
00844
00845 void getArgBox(Box a_argBox[SpaceDim]);
00846
00847 void getEntireBox(Box a_entireBox[SpaceDim])
00848 {
00849 for (int idir = 0; idir < SpaceDim; idir++)
00850 {
00851 a_entireBox[idir] = m_entireBox[idir];
00852 }
00853 }
00854 protected:
00855
00856
00857 Box m_modBoxOpen[SpaceDim];
00858
00859 static bool s_conservativeSource;
00860
00861 static int s_curLevel;
00862 static int s_curComp;
00863 static int s_doingVel;
00864 static int s_doingAdvVel;
00865 static bool s_verbose;
00866 static Real s_maxWaveSpeed;
00867 static IntVect s_maxWaveSpeedIV;
00868
00869 ProblemDomain m_domain;
00870 RealVect m_dx;
00871 Real m_dxScale;
00872 bool m_useAgg;
00873 BaseIFFAB<FaceStencil> m_interpStencils[SpaceDim];
00874 Box m_validBox;
00875
00876 EBISBox m_ebisBox;
00877 Real m_time;
00878 Real m_dt;
00879 bool m_isDefined;
00880 bool m_isBCSet;
00881 bool m_isBoxSet;
00882 bool m_isSlopeSet;
00883 bool m_isArtViscSet;
00884 bool m_useFourthOrderSlopes;
00885 bool m_useFlattening;
00886 bool m_useLimiting;
00887 bool m_useArtificialVisc;
00888 Vector<VolIndex> m_irregVoFs;
00889
00890 Vector<updateStencil_t> m_updateStencil;
00891
00892 EBPhysIBC* m_bc;
00893
00894
00895
00896 Box m_validBoxG4;
00897 IntVectSet m_coveredSetsPlusG4[SpaceDim];
00898 IntVectSet m_coveredSetsMinuG4[SpaceDim];
00899 Vector<VolIndex> m_coveredFacePlusG4[SpaceDim];
00900 Vector<VolIndex> m_coveredFaceMinuG4[SpaceDim];
00901
00902 BaseIVFAB<Real> m_extendStatePlusG4[SpaceDim];
00903 BaseIVFAB<Real> m_extendStateMinuG4[SpaceDim];
00904 BaseIVFAB<Real> m_coveredFluxPlusG4[SpaceDim];
00905 BaseIVFAB<Real> m_coveredFluxMinuG4[SpaceDim];
00906
00907 BaseIVFAB<Real> m_extendStatePlus3D[SpaceDim][SpaceDim];
00908 BaseIVFAB<Real> m_extendStateMinu3D[SpaceDim][SpaceDim];
00909 BaseIVFAB<Real> m_coveredFluxPlus3D[SpaceDim][SpaceDim];
00910 BaseIVFAB<Real> m_coveredFluxMinu3D[SpaceDim][SpaceDim];
00911
00912 EBCellFAB m_primPlus[SpaceDim];
00913 EBCellFAB m_primMinu[SpaceDim];
00914 EBCellFAB m_primState;
00915 EBCellFAB m_primMinuTemp;
00916 EBCellFAB m_primPlusTemp;
00917
00918 EBFluxFAB m_primGdnv;
00919 EBFaceFAB m_fluxOne[SpaceDim];
00920 EBFaceFAB m_fluxTwo[SpaceDim][SpaceDim];
00921
00922 BaseIVFAB<Real> m_coveredFluxNormMinu[SpaceDim];
00923 BaseIVFAB<Real> m_coveredFluxNormPlus[SpaceDim];
00924 BaseIVFAB<Real> m_extendStateNormMinu[SpaceDim];
00925 BaseIVFAB<Real> m_extendStateNormPlus[SpaceDim];
00926
00927
00928 void setSlopeStuff();
00929
00930 RefCountedPtr< AggStencil<EBCellFAB, EBCellFAB> > m_slopStenLo[SpaceDim];
00931 RefCountedPtr< AggStencil<EBCellFAB, EBCellFAB> > m_slopStenHi[SpaceDim];
00932 Box m_entireBox[SpaceDim];
00933
00934 struct
00935 {
00936 size_t offset;
00937 int dataID;
00938 } typedef access_t;
00939
00940 struct
00941 {
00942
00943 access_t slop_access;
00944 bool hasLo, hasHi;
00945 } typedef slop_logic_t;
00946
00947 Vector<slop_logic_t> m_slopVec[SpaceDim];
00948
00949 };
00950 #include "NamespaceFooter.H"
00951 #endif