Chombo + EB + MF
3.2
|
Level Godunov - really a hyperbolic level integrator. More...
#include <LevelGodunov.H>
Public Member Functions | |
LevelGodunov () | |
Default constructor. More... | |
~LevelGodunov () | |
Destructor. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Real | getMaxWaveSpeed (const LevelData< FArrayBox > &a_U) |
Return maximum wave speed. More... | |
GodunovPhysics * | getGodunovPhysicsPtr () |
Get the GodunovPhysics pointer from the PatchGodunov member. More... | |
const GodunovPhysics * | getGodunovPhysicsPtrConst () const |
void | highOrderLimiter (bool a_highOrderLimiter) |
Set whether to use high-order limiter. More... | |
Protected Attributes | |
DisjointBoxLayout | m_grids |
LayoutData< PatchGodunov > | m_patchGodunov |
PatchGodunov | m_patchGodunovNoBox |
just for global calls More... | |
int | m_numGhost |
Copier | m_exchangeCopier |
LevelData< FArrayBox > | m_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 &) | |
Level Godunov - really a hyperbolic level integrator.
LevelGodunov::LevelGodunov | ( | ) |
Default constructor.
Object requires define() to be called before all other functions.
LevelGodunov::~LevelGodunov | ( | ) |
|
private |
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).
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.
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().
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.
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 |
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.
|
private |
|
protected |
|
protected |
|
protected |
just for global calls
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |