LevelGodunov Class Reference

#include <LevelGodunov.H>

List of all members.


Detailed Description

Level Godunov - really a hyperbolic level integrator.

Public Member Functions

 LevelGodunov ()
 Default constructor.
 ~LevelGodunov ()
 Destructor.
void define (const DisjointBoxLayout &a_thisDisjointBoxLayout, const DisjointBoxLayout &a_coarserDisjointBoxLayout, const ProblemDomain &a_domain, const int &a_refineCoarse, const Real &a_dx, const GodunovPhysics *const a_godunovFactory, const int &a_normalPredOrder, const bool &a_useFourthOrderSlopes, const bool &a_usePrimLimiting, const bool &a_useCharLimiting, const bool &a_useFlattening, const bool &a_useArtificialViscosity, const Real &a_artificialViscosity, const bool &a_hasCoarser, const bool &a_hasFiner)
 Actual constructor.
Real step (LevelData< FArrayBox > &a_U, LevelData< FArrayBox > a_flux[CH_SPACEDIM], LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, 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)
 Take one timestep for this grid level.
void computeWHalf (LayoutData< FluxBox > &a_WHalf, LevelData< FArrayBox > &a_U, 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)
 Compute the time-centered values of the primitive variables on cell faces.
Real computeUpdate (LevelData< FArrayBox > &a_dU, LevelFluxRegister &a_finerFluxRegister, LevelFluxRegister &a_coarserFluxRegister, const LevelData< FArrayBox > &a_U, const LayoutData< FluxBox > &a_WHalf, const Real &a_time, const Real &a_dt)
 Compute the increment in the conserved variables from face variables.
Real getMaxWaveSpeed (const LevelData< FArrayBox > &a_U)
 Return maximum wave speed.
GodunovPhysicsgetGodunovPhysicsPtr ()
 Get the GodunovPhysics pointer from the PatchGodunov member.
const GodunovPhysicsgetGodunovPhysicsPtrConst () const
void highOrderLimiter (bool a_highOrderLimiter)
 Set whether to use high-order limiter.

Protected Attributes

DisjointBoxLayout m_grids
LayoutData< PatchGodunovm_patchGodunov
PatchGodunov m_patchGodunovNoBox
 just for global calls
int m_numGhost
Copier m_exchangeCopier
LevelData< FArrayBoxm_U
PiecewiseLinearFillPatch m_patcher
Real m_dx
ProblemDomain m_domain
int m_refineCoarse
int m_numCons
int m_numFluxes
bool m_hasCoarser
bool m_hasFiner
int m_normalPredOrder
bool m_useFourthOrderSlopes
bool m_usePrimLimiting
bool m_useCharLimiting
bool m_useFlattening
bool m_useArtificialViscosity
Real m_artificialViscosity
bool m_isDefined

Private Member Functions

void operator= (const LevelGodunov &)
 LevelGodunov (const LevelGodunov &)

Constructor & Destructor Documentation

LevelGodunov::LevelGodunov (  ) 

Default constructor.

Object requires define() to be called before all other functions.

LevelGodunov::~LevelGodunov (  ) 

Destructor.

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

LevelGodunov::LevelGodunov ( const LevelGodunov  )  [private]


Member Function Documentation

void LevelGodunov::define ( const DisjointBoxLayout a_thisDisjointBoxLayout,
const DisjointBoxLayout a_coarserDisjointBoxLayout,
const ProblemDomain a_domain,
const int &  a_refineCoarse,
const Real a_dx,
const GodunovPhysics *const   a_godunovFactory,
const int &  a_normalPredOrder,
const bool &  a_useFourthOrderSlopes,
const bool &  a_usePrimLimiting,
const bool &  a_useCharLimiting,
const bool &  a_useFlattening,
const bool &  a_useArtificialViscosity,
const Real a_artificialViscosity,
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_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_dx  grid spacing at this level
a_godunovFactory  pointer to GodunovPhysics class
a_normalPredOrder  order of the normal predictor: 1 for PLM, 2 for PPM
a_useFourthOrderSlopes  whether to use 4th-order slopes
a_usePrimLimiting  whether to apply slope limiting to primitive variables
a_useCharLimiting  whether to apply slope limiting to characteristic variables
a_useFlattening  whether to apply slope flattening
a_useArtificialViscosity  whether to apply artificial viscosity
a_artificialViscosity  artificial viscosity coefficient
a_hasCoarser  whether there is a coarser level
a_hasFiner  whether there is a finer level

Real LevelGodunov::step ( LevelData< FArrayBox > &  a_U,
LevelData< FArrayBox a_flux[CH_SPACEDIM],
LevelFluxRegister a_finerFluxRegister,
LevelFluxRegister a_coarserFluxRegister,
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 
)

Take one timestep for this grid level.

Parameters:
a_U  conserved variables at this level, defined on a_thisDisjointBoxLayout in define()
a_flux  flux, for passing face-centered data in and out of the function
a_finerFluxRegister  flux register with next finer level
a_coarserFluxRegister  flux register with next coarser level
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 LevelGodunov::computeWHalf ( LayoutData< FluxBox > &  a_WHalf,
LevelData< FArrayBox > &  a_U,
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 
)

Compute the time-centered values of the primitive variables on cell faces.

This API is used in cases where some operation over the whole level must be performed on the face-centered variables prior to the final difference update. Examples include incompressible flow and MHD, in which it is necessary to compute the projection of a face-centered vector field on its divergence-free part. To complete the differencing, it is necessary to call the member function computeUpdate().

Parameters:
a_WHalf  primitive variables extrapolated to cell faces and a half time step
a_U  conserved variables on current grids
a_S  source term on current grid
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

Real LevelGodunov::computeUpdate ( LevelData< FArrayBox > &  a_dU,
LevelFluxRegister a_finerFluxRegister,
LevelFluxRegister a_coarserFluxRegister,
const LevelData< FArrayBox > &  a_U,
const LayoutData< FluxBox > &  a_WHalf,
const Real a_time,
const Real a_dt 
)

Compute the increment in the conserved variables from face variables.

Compute dU = dt*dU/dt, the change in the conserved variables over the time step. Function returns the maximum stable time step.

Parameters:
a_dU  change in conserved variables over the time step
a_finerFluxRegister  flux register with next finer level
a_coarserFluxRegister  flux register with next coarser level
a_U  conserved variables at beginning of time step
a_WHalf  primitive variables extrapolated to cell faces and a half time step
a_time  current time
a_dt  time step

Real LevelGodunov::getMaxWaveSpeed ( const LevelData< FArrayBox > &  a_U  ) 

Return maximum wave speed.

GodunovPhysics* LevelGodunov::getGodunovPhysicsPtr (  ) 

Get the GodunovPhysics pointer from the PatchGodunov member.

Returns the pointer to the GodunovPhysics object that is used in the PatchGodunov class.

const GodunovPhysics* LevelGodunov::getGodunovPhysicsPtrConst (  )  const

void LevelGodunov::highOrderLimiter ( bool  a_highOrderLimiter  ) 

Set whether to use high-order limiter.

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


Member Data Documentation

just for global calls

int LevelGodunov::m_numGhost [protected]

Real LevelGodunov::m_dx [protected]

int LevelGodunov::m_numCons [protected]

int LevelGodunov::m_numFluxes [protected]

bool LevelGodunov::m_hasCoarser [protected]

bool LevelGodunov::m_hasFiner [protected]

bool LevelGodunov::m_isDefined [protected]


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

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