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

#include <PatchGodunov.H>

Public Member Functions

 PatchGodunov ()
 Constructor. More...
 
virtual ~PatchGodunov ()
 Destructor. More...
 
virtual void define (const ProblemDomain &a_domain, const Real &a_dx, const GodunovPhysics *const a_gdnvPhysicsPtr, 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)
 Define the object. More...
 
virtual void setCurrentTime (const Real &a_currentTime)
 Set the current time before calling updateState(), computeWHalf(), computeUpdate(). More...
 
virtual void setCurrentBox (const Box &a_currentBox)
 Set the current box before calling updateState(), computeWHalf(), computeUpdate(). More...
 
virtual void updateState (FArrayBox &a_U, FluxBox &a_F, Real &a_maxWaveSpeed, const FArrayBox &a_S, const Real &a_dt, const Box &a_box)
 Update the conserved variables and return the fluxes used to do this. More...
 
virtual void updateState (FArrayBox &a_U, FluxBox &a_F, FluxBox &a_wHalf, Real &a_maxWaveSpeed, const FArrayBox &a_S, const Real &a_dt, const Box &a_box)
 
virtual void computeWHalf (FluxBox &a_WHalf, const FArrayBox &a_U, const FArrayBox &a_S, const Real &a_dt, const Box &a_box)
 Compute the time-centered values of the primitive variables on cell faces. More...
 
virtual void computeUpdate (FArrayBox &a_dU, FluxBox &a_F, const FArrayBox &a_U, const FluxBox &a_WHalf, const Real &a_dt, const Box &a_box)
 Compute the increment in the conserved variables from face variables. More...
 
void computeFluxes (FluxBox &a_F, const FluxBox &a_WHalf, const Box &a_box)
 Compute fluxes from primitive variables on faces. More...
 
void CTUNormalPred (FArrayBox &a_WMinus, FArrayBox &a_WPlus, const Real &a_dt, const Real &a_dx, const FArrayBox &a_W, const FArrayBox &a_flat, const int &a_dir, const Box &a_box)
 CTU normal predictor. More...
 
void PLMNormalPred (FArrayBox &a_WMinus, FArrayBox &a_WPlus, const Real &a_dt, const Real &a_dx, const FArrayBox &a_W, const FArrayBox &a_flat, const int &a_dir, const Box &a_box)
 PLM normal predictor. More...
 
void PPMNormalPred (FArrayBox &a_WMinus, FArrayBox &a_WPlus, const Real &a_dt, const Real &a_dx, const FArrayBox &a_W, const FArrayBox &a_flat, const int &a_dir, const Box &a_box)
 PPM normal predictor. More...
 
GodunovPhysics * getGodunovPhysicsPtr ()
 Accessor to get at the GodunovPhysics object. More...
 
const ProblemDomain & problemDomain () const
 Get the problem domain for this object. More...
 
virtual bool isDefined () const
 Is the object completely defined. More...
 
void highOrderLimiter (bool a_highOrderLimiter)
 Set whether to use high-order limiter. More...
 
Real dx () const
 Returns the grid spacing at this level. More...
 
virtual void expressions (HDF5HeaderData &a_holder) const
 

Protected Attributes

ProblemDomain m_domain
 
Real m_dx
 
GodunovPhysics * m_gdnvPhysics
 
GodunovUtilities m_util
 
int m_normalPredOrder
 
bool m_useFourthOrderSlopes
 
bool m_usePrimLimiting
 
bool m_useCharLimiting
 
bool m_useFlattening
 
bool m_useArtificialViscosity
 
Real m_artificialViscosity
 
Real m_currentTime
 
bool m_isCurrentTimeSet
 
Box m_currentBox
 
bool m_isCurrentBoxSet
 
bool m_isDefined
 

Private Member Functions

void operator= (const PatchGodunov &)
 
 PatchGodunov (const PatchGodunov &)
 

Detailed Description

The base class PatchGodunov provides an implementation of a second-order, unsplit Godunov method acting on a single grid/patch. PatchGodunov provides an interface to the level integrator, LevelGodunov, which manages the entire level and flux corrections (via flux registers) to the coarser and finer levels.

Constructor & Destructor Documentation

◆ PatchGodunov() [1/2]

PatchGodunov::PatchGodunov ( )

Constructor.

◆ ~PatchGodunov()

virtual PatchGodunov::~PatchGodunov ( )
virtual

Destructor.

◆ PatchGodunov() [2/2]

PatchGodunov::PatchGodunov ( const PatchGodunov &  )
private

Member Function Documentation

◆ define()

virtual void PatchGodunov::define ( const ProblemDomain &  a_domain,
const Real &  a_dx,
const GodunovPhysics *const  a_gdnvPhysicsPtr,
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 
)
virtual

Define the object.

Parameters
a_domainproblem domain
a_dxgrid spacing
a_gdnvPhysicsPtrphysics class
a_normalPredOrderorder of the normal predictorr: 0 for CTU, 1 for PLM, 2 for PPM
a_useFourthOrderSlopeswhether to use 4th-order slopes
a_usePrimLimitingwhether to apply slope limiting to primitive variables
a_useCharLimitingwhether to apply slope limiting to characteristic variables
a_useFlatteningwhether to apply slope flattening
a_useArtificialViscositywhether to apply artificial viscosity
a_artificialViscosityartificial viscosity coefficient

◆ setCurrentTime()

virtual void PatchGodunov::setCurrentTime ( const Real &  a_currentTime)
virtual

Set the current time before calling updateState(), computeWHalf(), computeUpdate().

◆ setCurrentBox()

virtual void PatchGodunov::setCurrentBox ( const Box &  a_currentBox)
virtual

Set the current box before calling updateState(), computeWHalf(), computeUpdate().

◆ updateState() [1/2]

virtual void PatchGodunov::updateState ( FArrayBox &  a_U,
FluxBox &  a_F,
Real &  a_maxWaveSpeed,
const FArrayBox &  a_S,
const Real &  a_dt,
const Box &  a_box 
)
virtual

Update the conserved variables and return the fluxes used to do this.

Parameters
a_Uconserved variables, updated in this routine
a_Ffluxes from 2nd-order unsplit Godunov method, returned
a_maxWaveSpeedmaximum wave speed, returned
a_Ssource terms, or null constructed if none
a_dttime step
a_boxBox of a_U

◆ updateState() [2/2]

virtual void PatchGodunov::updateState ( FArrayBox &  a_U,
FluxBox &  a_F,
FluxBox &  a_wHalf,
Real &  a_maxWaveSpeed,
const FArrayBox &  a_S,
const Real &  a_dt,
const Box &  a_box 
)
virtual
Parameters
a_Uconserved variables, updated in this routine
a_Ffluxes from 2nd-order unsplit Godunov method, returned
a_wHalfprimitive variables extrapolated to cell faces and a half time step
a_maxWaveSpeedmaximum wave speed, returned
a_Ssource terms, or null constructed if none
a_dttime step
a_boxBox of a_U

◆ computeWHalf()

virtual void PatchGodunov::computeWHalf ( FluxBox &  a_WHalf,
const FArrayBox &  a_U,
const FArrayBox &  a_S,
const Real &  a_dt,
const Box &  a_box 
)
virtual

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_WHalfprimitive variables extrapolated to cell faces and a half time step
a_Uconserved variables at beginning of time step
a_Ssource terms, or null constructed if none
a_dttime step
a_boxBox of a_U

◆ computeUpdate()

virtual void PatchGodunov::computeUpdate ( FArrayBox &  a_dU,
FluxBox &  a_F,
const FArrayBox &  a_U,
const FluxBox &  a_WHalf,
const Real &  a_dt,
const Box &  a_box 
)
virtual

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. The fluxes are returned are suitable for use in refluxing.

Parameters
a_dUchange in conserved variables over the time step
a_Ffluxes for refluxing
a_Uconserved variables at beginning of time step
a_WHalfprimitive variables extrapolated to cell faces and a half time step
a_dttime step
a_boxBox of a_U

◆ computeFluxes()

void PatchGodunov::computeFluxes ( FluxBox &  a_F,
const FluxBox &  a_WHalf,
const Box &  a_box 
)

Compute fluxes from primitive variables on faces.

◆ CTUNormalPred()

void PatchGodunov::CTUNormalPred ( FArrayBox &  a_WMinus,
FArrayBox &  a_WPlus,
const Real &  a_dt,
const Real &  a_dx,
const FArrayBox &  a_W,
const FArrayBox &  a_flat,
const int &  a_dir,
const Box &  a_box 
)

CTU normal predictor.

Compute the increments in the characteristic amplitudes using CTU (for CTU, increments are zero)

◆ PLMNormalPred()

void PatchGodunov::PLMNormalPred ( FArrayBox &  a_WMinus,
FArrayBox &  a_WPlus,
const Real &  a_dt,
const Real &  a_dx,
const FArrayBox &  a_W,
const FArrayBox &  a_flat,
const int &  a_dir,
const Box &  a_box 
)

PLM normal predictor.

Compute the increments in the characteristic amplitudes using PLM

◆ PPMNormalPred()

void PatchGodunov::PPMNormalPred ( FArrayBox &  a_WMinus,
FArrayBox &  a_WPlus,
const Real &  a_dt,
const Real &  a_dx,
const FArrayBox &  a_W,
const FArrayBox &  a_flat,
const int &  a_dir,
const Box &  a_box 
)

PPM normal predictor.

Compute the increments in the characteristic amplitudes using PPM

◆ getGodunovPhysicsPtr()

GodunovPhysics* PatchGodunov::getGodunovPhysicsPtr ( )

Accessor to get at the GodunovPhysics object.

◆ problemDomain()

const ProblemDomain& PatchGodunov::problemDomain ( ) const

Get the problem domain for this object.

◆ isDefined()

virtual bool PatchGodunov::isDefined ( ) const
virtual

Is the object completely defined.

Return true if the object is completely defined.

◆ highOrderLimiter()

void PatchGodunov::highOrderLimiter ( bool  a_highOrderLimiter)

Set whether to use high-order limiter.

◆ dx()

Real PatchGodunov::dx ( ) const

Returns the grid spacing at this level.

◆ expressions()

virtual void PatchGodunov::expressions ( HDF5HeaderData &  a_holder) const
inlinevirtual

◆ operator=()

void PatchGodunov::operator= ( const PatchGodunov &  )
private

Member Data Documentation

◆ m_domain

ProblemDomain PatchGodunov::m_domain
protected

◆ m_dx

Real PatchGodunov::m_dx
protected

◆ m_gdnvPhysics

GodunovPhysics* PatchGodunov::m_gdnvPhysics
protected

◆ m_util

GodunovUtilities PatchGodunov::m_util
protected

◆ m_normalPredOrder

int PatchGodunov::m_normalPredOrder
protected

◆ m_useFourthOrderSlopes

bool PatchGodunov::m_useFourthOrderSlopes
protected

◆ m_usePrimLimiting

bool PatchGodunov::m_usePrimLimiting
protected

◆ m_useCharLimiting

bool PatchGodunov::m_useCharLimiting
protected

◆ m_useFlattening

bool PatchGodunov::m_useFlattening
protected

◆ m_useArtificialViscosity

bool PatchGodunov::m_useArtificialViscosity
protected

◆ m_artificialViscosity

Real PatchGodunov::m_artificialViscosity
protected

◆ m_currentTime

Real PatchGodunov::m_currentTime
protected

◆ m_isCurrentTimeSet

bool PatchGodunov::m_isCurrentTimeSet
protected

◆ m_currentBox

Box PatchGodunov::m_currentBox
protected

◆ m_isCurrentBoxSet

bool PatchGodunov::m_isCurrentBoxSet
protected

◆ m_isDefined

bool PatchGodunov::m_isDefined
protected

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