#include <LevelAdvect.H>
Public Member Functions | |
| LevelAdvect () | |
| Default constructor. | |
| ~LevelAdvect () | |
| Destructor. | |
| 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. | |
| 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. | |
| void | averageVelToCC (FArrayBox &a_normalVel, const FluxBox &a_advectionVel, const Box &a_box) const |
| Convert velocity from face-centered to cell-centered. | |
| 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). | |
| Real | getMaxWaveSpeed (const LevelData< FArrayBox > &a_U, LevelData< FluxBox > &a_advectionVelocity) |
| Get maximum wave speed. | |
Protected Attributes | |
| DisjointBoxLayout | m_grids |
| layout for this level | |
| PatchGodunov | m_patchGodunov |
| patch integrator | |
| AdvectPhysics * | m_advectPhysics |
| physics class | |
| int | m_numGhost |
| number of ghost cells need locally for this level | |
| Copier | m_exchangeCopier |
| exchange copier | |
| PiecewiseLinearFillPatch | m_patcher |
| interpolator for filling in ghost cells from the next coarser level | |
| Real | m_dx |
| grid spacing | |
| ProblemDomain | m_domain |
| problem domain - index space for this level | |
| int | m_refineCoarse |
| refinement ratio between this level and the next coarser | |
| bool | m_hasCoarser |
| whether a coarser level exists | |
| bool | m_hasFiner |
| whether a finer level exists | |
| int | m_numCons |
| number of conserved variables (= 1) | |
| int | m_normalPredOrder |
| order of normal predictor | |
| bool | m_useFourthOrderSlopes |
| whether to use 4th-order slope computations (otherwise, use 2nd order) | |
| bool | m_usePrimLimiting |
| whether to do slope limiting in the primitive variables | |
| bool | m_useCharLimiting |
| whether to do slope limiting in the characteristic variables | |
| bool | m_useFlattening |
| whether to do slope flattening - MUST BE USING 4th-order slopes | |
| bool | m_useArtificialViscosity |
| whether to apply artificial viscosity of a set value | |
| Real | m_artificialViscosity |
| artificial viscosity coefficient | |
| bool | m_isDefined |
| whether this object has been defined | |
Private Member Functions | |
| void | operator= (const LevelAdvect &) |
| LevelAdvect (const LevelAdvect &) | |
| LevelAdvect::LevelAdvect | ( | ) | [inline] |
Default constructor.
Object requires define() to be called before all other functions.
References m_dx, m_isDefined, and m_refineCoarse.
| LevelAdvect::~LevelAdvect | ( | ) | [inline] |
| LevelAdvect::LevelAdvect | ( | const LevelAdvect & | ) | [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 |
| 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 |
| 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 |
| 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 |
| 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 |
| void LevelAdvect::operator= | ( | const LevelAdvect & | ) | [private] |
DisjointBoxLayout LevelAdvect::m_grids [protected] |
layout for this level
PatchGodunov LevelAdvect::m_patchGodunov [protected] |
patch integrator
AdvectPhysics* LevelAdvect::m_advectPhysics [protected] |
physics class
int LevelAdvect::m_numGhost [protected] |
number of ghost cells need locally for this level
Copier LevelAdvect::m_exchangeCopier [protected] |
exchange copier
PiecewiseLinearFillPatch LevelAdvect::m_patcher [protected] |
interpolator for filling in ghost cells from the next coarser level
Real LevelAdvect::m_dx [protected] |
ProblemDomain LevelAdvect::m_domain [protected] |
problem domain - index space for this level
int LevelAdvect::m_refineCoarse [protected] |
bool LevelAdvect::m_hasCoarser [protected] |
whether a coarser level exists
bool LevelAdvect::m_hasFiner [protected] |
whether a finer level exists
int LevelAdvect::m_numCons [protected] |
number of conserved variables (= 1)
int LevelAdvect::m_normalPredOrder [protected] |
order of normal predictor
bool LevelAdvect::m_useFourthOrderSlopes [protected] |
whether to use 4th-order slope computations (otherwise, use 2nd order)
bool LevelAdvect::m_usePrimLimiting [protected] |
whether to do slope limiting in the primitive variables
bool LevelAdvect::m_useCharLimiting [protected] |
whether to do slope limiting in the characteristic variables
bool LevelAdvect::m_useFlattening [protected] |
whether to do slope flattening - MUST BE USING 4th-order slopes
bool LevelAdvect::m_useArtificialViscosity [protected] |
whether to apply artificial viscosity of a set value
Real LevelAdvect::m_artificialViscosity [protected] |
artificial viscosity coefficient
bool LevelAdvect::m_isDefined [protected] |
1.5.5