LevelAdvect Class Reference

#include <LevelAdvect.H>

List of all members.


Detailed Description

Advection integrator on a level.

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
AdvectPhysicsm_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 &)

Constructor & Destructor Documentation

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]

Destructor.

Destroys all objects created by define(). Passed in data references of define() are left alone.

LevelAdvect::LevelAdvect ( const LevelAdvect  )  [private]


Member Function Documentation

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).

Parameters:
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.

Parameters:
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.

Parameters:
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).

Parameters:
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.

Parameters:
a_U  conserved variables at this level
a_advectionVelocity  face-centered velocities

void LevelAdvect::operator= ( const LevelAdvect  )  [private]


Member Data Documentation

layout for this level

patch integrator

physics class

int LevelAdvect::m_numGhost [protected]

number of ghost cells need locally for this level

exchange copier

interpolator for filling in ghost cells from the next coarser level

Real LevelAdvect::m_dx [protected]

grid spacing

Referenced by LevelAdvect().

problem domain - index space for this level

int LevelAdvect::m_refineCoarse [protected]

refinement ratio between this level and the next coarser

Referenced by LevelAdvect().

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)

order of normal predictor

whether to use 4th-order slope computations (otherwise, use 2nd order)

whether to do slope limiting in the primitive variables

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

whether to apply artificial viscosity of a set value

artificial viscosity coefficient

bool LevelAdvect::m_isDefined [protected]

whether this object has been defined

Referenced by LevelAdvect().


The documentation for this class was generated from the following file:

Generated on Fri Apr 5 04:25:08 2019 for Chombo + EB by  doxygen 1.5.5