|
Chombo + EB + MF
3.2
|
Advection integrator on a level. More...
#include <LevelAdvect.H>
Public Member Functions | |
| LevelAdvect () | |
| Default constructor. More... | |
| ~LevelAdvect () | |
| Destructor. More... | |
| void | define (const AdvectPhysics &a_gphys, const DisjointBoxLayout &a_thisDisjointBoxLayout, const DisjointBoxLayout &a_coarserDisjointBoxLayout, const ProblemDomain &a_domain, const int &a_refineCoarse, const bool &a_useLimiting, const Real &a_dx, const bool &a_hasCoarser, const bool &a_hasFiner) |
| Actual constructor. More... | |
| Real | step (LevelData< FArrayBox > &a_U, LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, LevelData< FluxBox > &a_advectionVelocity, const LevelData< FArrayBox > &a_S, const LevelData< FArrayBox > &a_UCoarseOld, const Real &a_TCoarseOld, const LevelData< FArrayBox > &a_UCoarseNew, const Real &a_TCoarseNew, const Real &a_time, const Real &a_dt) |
| Advance the solution by one timestep on this grid level. More... | |
| void | averageVelToCC (FArrayBox &a_normalVel, const FluxBox &a_advectionVel, const Box &a_box) const |
| Convert velocity from face-centered to cell-centered. More... | |
| void | fillGhost (LevelData< FArrayBox > &a_U, const LevelData< FArrayBox > &a_UCoarseOld, const Real &a_TCoarseOld, const LevelData< FArrayBox > &a_UCoarseNew, const Real &a_TCoarseNew, const Real &a_dt, const Real &a_time) |
| Fill in ghost cells by exchange at this level and then by interpolation from coarser level (if any). More... | |
| Real | getMaxWaveSpeed (const LevelData< FArrayBox > &a_U, LevelData< FluxBox > &a_advectionVelocity) |
| Get maximum wave speed. More... | |
Protected Attributes | |
| DisjointBoxLayout | m_grids |
| layout for this level More... | |
| PatchGodunov | m_patchGodunov |
| patch integrator More... | |
| AdvectPhysics * | m_advectPhysics |
| physics class More... | |
| int | m_numGhost |
| number of ghost cells need locally for this level More... | |
| Copier | m_exchangeCopier |
| exchange copier More... | |
| PiecewiseLinearFillPatch | m_patcher |
| interpolator for filling in ghost cells from the next coarser level More... | |
| Real | m_dx |
| grid spacing More... | |
| ProblemDomain | m_domain |
| problem domain - index space for this level More... | |
| int | m_refineCoarse |
| refinement ratio between this level and the next coarser More... | |
| bool | m_hasCoarser |
| whether a coarser level exists More... | |
| bool | m_hasFiner |
| whether a finer level exists More... | |
| int | m_numCons |
| number of conserved variables (= 1) More... | |
| int | m_normalPredOrder |
| order of normal predictor More... | |
| bool | m_useFourthOrderSlopes |
| whether to use 4th-order slope computations (otherwise, use 2nd order) More... | |
| bool | m_usePrimLimiting |
| whether to do slope limiting in the primitive variables More... | |
| bool | m_useCharLimiting |
| whether to do slope limiting in the characteristic variables More... | |
| bool | m_useFlattening |
| whether to do slope flattening - MUST BE USING 4th-order slopes More... | |
| bool | m_useArtificialViscosity |
| whether to apply artificial viscosity of a set value More... | |
| Real | m_artificialViscosity |
| artificial viscosity coefficient More... | |
| bool | m_isDefined |
| whether this object has been defined More... | |
Private Member Functions | |
| void | operator= (const LevelAdvect &) |
| LevelAdvect (const LevelAdvect &) | |
Advection integrator on a level.
|
inline |
Default constructor.
Object requires define() to be called before all other functions.
References m_dx, m_isDefined, and m_refineCoarse.
|
inline |
Destructor.
Destroys all objects created by define(). Passed in data references of define() are left alone.
References averageVelToCC(), define(), fillGhost(), getMaxWaveSpeed(), and step().
|
private |
| void LevelAdvect::define | ( | const AdvectPhysics & | a_gphys, |
| const DisjointBoxLayout & | a_thisDisjointBoxLayout, | ||
| const DisjointBoxLayout & | a_coarserDisjointBoxLayout, | ||
| const ProblemDomain & | a_domain, | ||
| const int & | a_refineCoarse, | ||
| const bool & | a_useLimiting, | ||
| const Real & | a_dx, | ||
| const bool & | a_hasCoarser, | ||
| const bool & | a_hasFiner | ||
| ) |
Actual constructor.
Inside the routine, we cast away const-ness on the data members for the assignment. The arguments passed in are maintained const (coding standards).
| a_gphys | advection physics class |
| a_thisDisjointBoxLayout | box layout at this level |
| a_coarserDisjointBoxLayout | box layout at next coarser level (or empty if this is coarsest level) |
| a_domain | problem domain at this level |
| a_refineCoarse | refinement ratio between this level and next coarser level |
| a_useLimiting | whether to use limiting |
| a_dx | grid spacing at this level |
| a_hasCoarser | whether there is a coarser level |
| a_hasFiner | whether there is a finer level |
Referenced by ~LevelAdvect().
| Real LevelAdvect::step | ( | LevelData< FArrayBox > & | a_U, |
| LevelFluxRegister & | a_finerFluxRegister, | ||
| LevelFluxRegister & | a_coarserFluxRegister, | ||
| LevelData< FluxBox > & | a_advectionVelocity, | ||
| const LevelData< FArrayBox > & | a_S, | ||
| const LevelData< FArrayBox > & | a_UCoarseOld, | ||
| const Real & | a_TCoarseOld, | ||
| const LevelData< FArrayBox > & | a_UCoarseNew, | ||
| const Real & | a_TCoarseNew, | ||
| const Real & | a_time, | ||
| const Real & | a_dt | ||
| ) |
Advance the solution by one timestep on this grid level.
| a_U | conserved variables at this level, defined on a_thisDisjointBoxLayout in define(); gets updated in this routine |
| a_finerFluxRegister | flux register with next finer level |
| a_coarserFluxRegister | flux register with next coarser level |
| a_advectionVelocity | advection velocity on faces |
| a_S | source term, or if no source term then this is null constructed and not defined |
| a_UCoarseOld | conserved variables at coarser level at time of last coarser-level update, or empty if no coarser level; may be empty if interpolation not required |
| a_TCoarseOld | time of last update at coarser level |
| a_UCoarseNew | conserved variables at coarser level at time of next coarser-level update, or empty if no coarser level; may be empty if interpolation not required |
| a_TCoarseNew | time of next update at coarser level |
| a_time | current time |
| a_dt | time step |
Referenced by ~LevelAdvect().
| void LevelAdvect::averageVelToCC | ( | FArrayBox & | a_normalVel, |
| const FluxBox & | a_advectionVel, | ||
| const Box & | a_box | ||
| ) | const |
Convert velocity from face-centered to cell-centered.
In each direction, take average of normal component of velocity on the neighboring faces in that direction.
| a_normalVel | cell-centered velocity |
| a_advectionVel | face-centered velocity |
| a_box | Box on which to return a_normalVel |
Referenced by ~LevelAdvect().
| void LevelAdvect::fillGhost | ( | LevelData< FArrayBox > & | a_U, |
| const LevelData< FArrayBox > & | a_UCoarseOld, | ||
| const Real & | a_TCoarseOld, | ||
| const LevelData< FArrayBox > & | a_UCoarseNew, | ||
| const Real & | a_TCoarseNew, | ||
| const Real & | a_dt, | ||
| const Real & | a_time | ||
| ) |
Fill in ghost cells by exchange at this level and then by interpolation from coarser level (if any).
| a_U | conserved variables at this level, with ghosts cells to be filled in |
| a_UCoarseOld | conserved variables at coarser level at time of last coarser-level update, or empty if no coarser level; may be empty if interpolation not required |
| a_TCoarseOld | time of last update at coarser level |
| a_UCoarseNew | conserved variables at coarser level at time of next coarser-level update, or empty if no coarser level; may be empty if interpolation not required |
| a_TCoarseNew | time of next update at coarser level |
| a_dt | time step |
| a_time | current time |
Referenced by ~LevelAdvect().
| Real LevelAdvect::getMaxWaveSpeed | ( | const LevelData< FArrayBox > & | a_U, |
| LevelData< FluxBox > & | a_advectionVelocity | ||
| ) |
Get maximum wave speed.
| a_U | conserved variables at this level |
| a_advectionVelocity | face-centered velocities |
Referenced by ~LevelAdvect().
|
private |
|
protected |
layout for this level
|
protected |
patch integrator
|
protected |
physics class
|
protected |
number of ghost cells need locally for this level
|
protected |
exchange copier
|
protected |
interpolator for filling in ghost cells from the next coarser level
|
protected |
grid spacing
Referenced by LevelAdvect().
|
protected |
problem domain - index space for this level
|
protected |
refinement ratio between this level and the next coarser
Referenced by LevelAdvect().
|
protected |
whether a coarser level exists
|
protected |
whether a finer level exists
|
protected |
number of conserved variables (= 1)
|
protected |
order of normal predictor
|
protected |
whether to use 4th-order slope computations (otherwise, use 2nd order)
|
protected |
whether to do slope limiting in the primitive variables
|
protected |
whether to do slope limiting in the characteristic variables
|
protected |
whether to do slope flattening - MUST BE USING 4th-order slopes
|
protected |
whether to apply artificial viscosity of a set value
|
protected |
artificial viscosity coefficient
|
protected |
whether this object has been defined
Referenced by LevelAdvect().
1.8.13