Chombo + EB  3.2
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
LevelAdvect Class Reference

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

Detailed Description

Advection integrator on a level.

Constructor & Destructor Documentation

◆ LevelAdvect() [1/2]

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::~LevelAdvect ( )
inline

Destructor.

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

References averageVelToCC(), define(), fillGhost(), getMaxWaveSpeed(), and step().

◆ LevelAdvect() [2/2]

LevelAdvect::LevelAdvect ( const LevelAdvect )
private

Member Function Documentation

◆ define()

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_gphysadvection physics class
a_thisDisjointBoxLayoutbox layout at this level
a_coarserDisjointBoxLayoutbox layout at next coarser level (or empty if this is coarsest level)
a_domainproblem domain at this level
a_refineCoarserefinement ratio between this level and next coarser level
a_useLimitingwhether to use limiting
a_dxgrid spacing at this level
a_hasCoarserwhether there is a coarser level
a_hasFinerwhether there is a finer level

Referenced by ~LevelAdvect().

◆ step()

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_Uconserved variables at this level, defined on a_thisDisjointBoxLayout in define(); gets updated in this routine
a_finerFluxRegisterflux register with next finer level
a_coarserFluxRegisterflux register with next coarser level
a_advectionVelocityadvection velocity on faces
a_Ssource term, or if no source term then this is null constructed and not defined
a_UCoarseOldconserved 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_TCoarseOldtime of last update at coarser level
a_UCoarseNewconserved 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_TCoarseNewtime of next update at coarser level
a_timecurrent time
a_dttime step

Referenced by ~LevelAdvect().

◆ averageVelToCC()

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_normalVelcell-centered velocity
a_advectionVelface-centered velocity
a_boxBox on which to return a_normalVel

Referenced by ~LevelAdvect().

◆ fillGhost()

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_Uconserved variables at this level, with ghosts cells to be filled in
a_UCoarseOldconserved 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_TCoarseOldtime of last update at coarser level
a_UCoarseNewconserved 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_TCoarseNewtime of next update at coarser level
a_dttime step
a_timecurrent time

Referenced by ~LevelAdvect().

◆ getMaxWaveSpeed()

Real LevelAdvect::getMaxWaveSpeed ( const LevelData< FArrayBox > &  a_U,
LevelData< FluxBox > &  a_advectionVelocity 
)

Get maximum wave speed.

Parameters
a_Uconserved variables at this level
a_advectionVelocityface-centered velocities

Referenced by ~LevelAdvect().

◆ operator=()

void LevelAdvect::operator= ( const LevelAdvect )
private

Member Data Documentation

◆ m_grids

DisjointBoxLayout LevelAdvect::m_grids
protected

layout for this level

◆ m_patchGodunov

PatchGodunov LevelAdvect::m_patchGodunov
protected

patch integrator

◆ m_advectPhysics

AdvectPhysics* LevelAdvect::m_advectPhysics
protected

physics class

◆ m_numGhost

int LevelAdvect::m_numGhost
protected

number of ghost cells need locally for this level

◆ m_exchangeCopier

Copier LevelAdvect::m_exchangeCopier
protected

exchange copier

◆ m_patcher

PiecewiseLinearFillPatch LevelAdvect::m_patcher
protected

interpolator for filling in ghost cells from the next coarser level

◆ m_dx

Real LevelAdvect::m_dx
protected

grid spacing

Referenced by LevelAdvect().

◆ m_domain

ProblemDomain LevelAdvect::m_domain
protected

problem domain - index space for this level

◆ m_refineCoarse

int LevelAdvect::m_refineCoarse
protected

refinement ratio between this level and the next coarser

Referenced by LevelAdvect().

◆ m_hasCoarser

bool LevelAdvect::m_hasCoarser
protected

whether a coarser level exists

◆ m_hasFiner

bool LevelAdvect::m_hasFiner
protected

whether a finer level exists

◆ m_numCons

int LevelAdvect::m_numCons
protected

number of conserved variables (= 1)

◆ m_normalPredOrder

int LevelAdvect::m_normalPredOrder
protected

order of normal predictor

◆ m_useFourthOrderSlopes

bool LevelAdvect::m_useFourthOrderSlopes
protected

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

◆ m_usePrimLimiting

bool LevelAdvect::m_usePrimLimiting
protected

whether to do slope limiting in the primitive variables

◆ m_useCharLimiting

bool LevelAdvect::m_useCharLimiting
protected

whether to do slope limiting in the characteristic variables

◆ m_useFlattening

bool LevelAdvect::m_useFlattening
protected

whether to do slope flattening - MUST BE USING 4th-order slopes

◆ m_useArtificialViscosity

bool LevelAdvect::m_useArtificialViscosity
protected

whether to apply artificial viscosity of a set value

◆ m_artificialViscosity

Real LevelAdvect::m_artificialViscosity
protected

artificial viscosity coefficient

◆ m_isDefined

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: