GodunovUtilities Class Reference

#include <GodunovUtilities.H>

List of all members.


Detailed Description

Utility class for higher-order Godunov methods: slopes, parabolic interpolants, limiters. Contains no physics-dependent methods, but one of the member functions (PPMFaceValues()) may require a pointer to a GodunovPhysics class in order to set boundary slopes.

Public Member Functions

 GodunovUtilities ()
 Constructor.
 ~GodunovUtilities ()
 Destructor.
void define (const ProblemDomain &a_domain, const Real &a_dx)
 Define the object.
Slopes
void vanLeerSlopes (FArrayBox &a_dW, const FArrayBox &a_W, const int &a_numSlopes, const bool &a_useLimiting, const int &a_dir, const Box &a_box)
 Compute componentwise van Leer slopes.
void fourthOrderSlopes (FArrayBox &a_dW4, const FArrayBox &a_W, const FArrayBox &a_dWvL, const int &a_numSlopes, const int &a_dir, const Box &a_box)
 Compute fourth-order slopes.
void oneSidedDifferences (FArrayBox &a_dWMinus, FArrayBox &a_dWPlus, const FArrayBox &a_W, const int &a_dir, const Box &a_box)
 Compute slopes (dW- and dW+) using one sided differences.
void slopes (FArrayBox &a_dWCent, FArrayBox &a_dWMinus, FArrayBox &a_dWPlus, const FArrayBox &a_W, const int &a_numSlopes, const int &a_dir, const Box &a_loBox, const Box &a_hiBox, const Box &a_centerBox, const Box &a_entireBox, const int &a_hasLo, const int &a_hasHi)
 Compute slopes (dW (center), dW-, and dW+).
Parabolic interpolants
void PLMNormalPred (FArrayBox &a_dWCharMinus, FArrayBox &a_dWCharPlus, const FArrayBox &a_dWChar, const FArrayBox &a_Lambda, const Real &a_dtbydx, const Box &a_box)
 PLM normal predictor.
void PPMFaceValues (FArrayBox &a_WFace, const FArrayBox &a_W, const int &a_numSlopes, const bool &a_useLimiting, const int &a_dir, const Box &a_box, const Real &a_time, const GodunovPhysics *a_physPtr=NULL)
 PPM face-centered interpolant.
void PPMNormalPred (FArrayBox &a_dWMinus, FArrayBox &a_dWPlus, const FArrayBox &a_Lambda, const Real &a_dtbydx, const int &a_numSlopes, const Box &a_box)
 PPM normal predictor.
Limiters
void slopeLimiter (FArrayBox &a_dW, const FArrayBox &a_dWMinus, const FArrayBox &a_dWPlus, const int &a_numSlopes, const Box &a_box)
 van Leer slope limiter.
void slopeLimiterExtPreserving (FArrayBox &a_dW, const FArrayBox &a_dWMinus, const FArrayBox &a_dWPlus, const int &a_numSlopes, const Box &a_box, const int &a_dir)
 extremum-preserving van Leer slope limiter.
void PPMLimiter (FArrayBox &a_dWMinus, FArrayBox &a_dWPlus, const FArrayBox &a_W, const int &a_numSlopes, const int &a_dir, const Box &a_box)
 PPM Limiter.
void highOrderLimiter (bool a_highOrderLimiter)
 Set whether to use high-order limiter.
Dissipation mechanisms
void computeFlattening (FArrayBox &a_flattening, const FArrayBox &a_W, const Interval &a_velInt, const int &a_presInd, const Real &a_smallPres, const int &a_bulkModulusInd, const Box &a_box)
 Compute the slope flattening coefficients.
void applyFlattening (FArrayBox &a_dW, const FArrayBox &a_flat, const Box &a_box)
 Apply the flattening to slopes.
void artificialViscosity (FArrayBox &a_F, const FArrayBox &a_U, const FArrayBox &a_divVel, const Real &a_scale, const int &a_dir, const Box &a_box)
 Compute face-centered artificial viscosity flux.
Divergence
void divVel (FArrayBox &a_divVel, const FArrayBox &a_W, const Interval &a_velInt, const int &a_dir, const Box &a_box)
 Compute face-centered velocity divergence.
void divVelHO (FArrayBox &a_divVel, const FArrayBox &a_W, const int &a_dir, const Box &a_box, GodunovPhysics *a_physPtr)
 Compute high-order face-centered velocity divergence for artificial viscosity.
Deconvolution and convolution
void deconvolve (FArrayBox &a_avgFab, const FArrayBox &a_cellFab, int a_sign=1)
 Deconvolve from cell-centered to cell-averaged data (or vice versa).
void deconvolve (FArrayBox &a_avgFab, const FArrayBox &a_cellFab, const Box &a_box, int a_sign=1)
 Deconvolve from cell-centered to cell-averaged data (or vice versa) on a specified box.
void deconvolveFace (FluxBox &a_avgFlux, const FluxBox &a_cellFlux, int a_sign=1)
 Deconvolve from face-centered to face-averaged data (or vice versa).
void deconvolveFace (FluxBox &a_avgFlux, const FluxBox &a_cellFlux, const Box &a_box, int a_sign=1)
 Deconvolve from face-centered to face-averaged data (or vice versa) on a specified box.

Protected Attributes

ProblemDomain m_domain
Real m_dx
bool m_isDefined
bool m_highOrderLimiter

Private Member Functions

void operator= (const GodunovUtilities &)
 GodunovUtilities (const GodunovUtilities &)

Constructor & Destructor Documentation

GodunovUtilities::GodunovUtilities (  ) 

Constructor.

GodunovUtilities::~GodunovUtilities (  ) 

Destructor.

GodunovUtilities::GodunovUtilities ( const GodunovUtilities  )  [private]


Member Function Documentation

void GodunovUtilities::define ( const ProblemDomain a_domain,
const Real a_dx 
)

Define the object.

void GodunovUtilities::vanLeerSlopes ( FArrayBox a_dW,
const FArrayBox a_W,
const int &  a_numSlopes,
const bool &  a_useLimiting,
const int &  a_dir,
const Box a_box 
)

Compute componentwise van Leer slopes.

Given cell averages W, compute van Leer slopes dW on a component-by-component basis.

void GodunovUtilities::fourthOrderSlopes ( FArrayBox a_dW4,
const FArrayBox a_W,
const FArrayBox a_dWvL,
const int &  a_numSlopes,
const int &  a_dir,
const Box a_box 
)

Compute fourth-order slopes.

Given cell averages W and van Leer slopes dWvL, compute fourth-order slopes dW4. Limiting is performed in a separate pass.

void GodunovUtilities::oneSidedDifferences ( FArrayBox a_dWMinus,
FArrayBox a_dWPlus,
const FArrayBox a_W,
const int &  a_dir,
const Box a_box 
)

Compute slopes (dW- and dW+) using one sided differences.

void GodunovUtilities::slopes ( FArrayBox a_dWCent,
FArrayBox a_dWMinus,
FArrayBox a_dWPlus,
const FArrayBox a_W,
const int &  a_numSlopes,
const int &  a_dir,
const Box a_loBox,
const Box a_hiBox,
const Box a_centerBox,
const Box a_entireBox,
const int &  a_hasLo,
const int &  a_hasHi 
)

Compute slopes (dW (center), dW-, and dW+).

a_dwCent, a_dwMinus, a_dWPlus, and a_dW all live on cell-centered a_entireBox.

For i in a_centerBox: a_dwCent[i] = (a_W[i+1] - a_W[i-1])/2; a_dWMinus[i] = a_W[i] - a_W[i-1]; a_dWPlus[i] = a_W[i+1] - a_W[i].

For i in a_loBox, set only a_dWPlus[i] = a_W[i+1] - a_W[i] and copy it to a_dWCent[i] and a_dWMinus[i].

For i in a_hiBox, set only a_dWMinus[i] = a_W[i] - a_W[i-1] and copy it to a_dWCent[i] and a_dWPlus[i].

void GodunovUtilities::PLMNormalPred ( FArrayBox a_dWCharMinus,
FArrayBox a_dWCharPlus,
const FArrayBox a_dWChar,
const FArrayBox a_Lambda,
const Real a_dtbydx,
const Box a_box 
)

PLM normal predictor.

Compute the increments in the characteristic amplitudes.

void GodunovUtilities::PPMFaceValues ( FArrayBox a_WFace,
const FArrayBox a_W,
const int &  a_numSlopes,
const bool &  a_useLimiting,
const int &  a_dir,
const Box a_box,
const Real a_time,
const GodunovPhysics a_physPtr = NULL 
)

PPM face-centered interpolant.

Given the cell average a_W, compute fourth-order accurate face-centered values WFace on a_box by differentiating the indefinite integral. Limiting is performed in a separate pass.

void GodunovUtilities::PPMNormalPred ( FArrayBox a_dWMinus,
FArrayBox a_dWPlus,
const FArrayBox a_Lambda,
const Real a_dtbydx,
const int &  a_numSlopes,
const Box a_box 
)

PPM normal predictor.

On input, dW(Minus,Plus), contain the characteristic expansions of the differences between the (minus, plus) face values and the cell average. On output, dW(Minus,Plus) contain the characteristic amplitudes of the corrections required to compute the normal predictor.

void GodunovUtilities::slopeLimiter ( FArrayBox a_dW,
const FArrayBox a_dWMinus,
const FArrayBox a_dWPlus,
const int &  a_numSlopes,
const Box a_box 
)

van Leer slope limiter.

On input, dW contains the centered, unlimited slopes, and dW(Minus,Plus) contain the one-sided slopes from the minus, plus sides. On output, dW contains the limited slopes. slopes dW4. Limiting is performed in a separate pass.

void GodunovUtilities::slopeLimiterExtPreserving ( FArrayBox a_dW,
const FArrayBox a_dWMinus,
const FArrayBox a_dWPlus,
const int &  a_numSlopes,
const Box a_box,
const int &  a_dir 
)

extremum-preserving van Leer slope limiter.

On input, dW contains the centered, unlimited slopes, and dW(Minus,Plus) contain the one-sided slopes from the minus, plus sides. On output, dW contains the limited slopes. slopes dW4. Limiting is performed in a separate pass.

void GodunovUtilities::PPMLimiter ( FArrayBox a_dWMinus,
FArrayBox a_dWPlus,
const FArrayBox a_W,
const int &  a_numSlopes,
const int &  a_dir,
const Box a_box 
)

PPM Limiter.

a_dWMinus and a_dWPlus are the differences between the face values on the minus and plus sides of cells and the average in the cell. That is, a_dWMinus[i] = WFace[i - e/2] - a_W[i] a_dWPlus[i] = WFace[i + e/2] - a_W[i] where e is the unit vector in dimension a_dir. The PPM limiter is applied to these values to obtain a monotone interpolant in the cell. The function returns the limited a_dWMinus and a_dWPlus on a_box. petermc, 4 Sep 2008: included a_W in argument list

If m_highOrderLimiter, then need a_dWMinus and a_dWPlus on a_box, and need a_W on on a_box grown by 3 in dimension a_dir. Returns limited a_dWMinus and a_dWPlus on a_box.

void GodunovUtilities::highOrderLimiter ( bool  a_highOrderLimiter  ) 

Set whether to use high-order limiter.

void GodunovUtilities::computeFlattening ( FArrayBox a_flattening,
const FArrayBox a_W,
const Interval a_velInt,
const int &  a_presInd,
const Real a_smallPres,
const int &  a_bulkModulusInd,
const Box a_box 
)

Compute the slope flattening coefficients.

Compute the slope flattening coefficients, a_flattening, using the primitive variables, a_W, within a_box.

Parameters:
a_flattening  flattening coeffs, 1 component on a_box
a_W  primitive variables, on a_box grown by 3 within m_domain
a_velInt  interval of a_W with velocity; length SpaceDim
a_presInd  index of a_W with pressure
a_smallPres  minimum pressure to use in ratio
a_bulkModulusInd  index of a_W with bulk modulus
a_box  cell-centered box on which a_flattening lives

void GodunovUtilities::applyFlattening ( FArrayBox a_dW,
const FArrayBox a_flat,
const Box a_box 
)

Apply the flattening to slopes.

Multiply every component of a_dW by a_flat, on a_box.

Parameters:
a_dW  slopes to be flattened, on at least a_box
a_flat  cell-centered flattening coefficients, on at least a_box
a_box  cell-centered box on which to flatten

void GodunovUtilities::artificialViscosity ( FArrayBox a_F,
const FArrayBox a_U,
const FArrayBox a_divVel,
const Real a_scale,
const int &  a_dir,
const Box a_box 
)

Compute face-centered artificial viscosity flux.

Increments face-centered flux in the a_dir direction with quadratic artificial viscosity.

void GodunovUtilities::divVel ( FArrayBox a_divVel,
const FArrayBox a_W,
const Interval a_velInt,
const int &  a_dir,
const Box a_box 
)

Compute face-centered velocity divergence.

Returns face-centered velocity divergence on faces in the direction a_dir. The velocities are the components a_velInterval of a_W.

void GodunovUtilities::divVelHO ( FArrayBox a_divVel,
const FArrayBox a_W,
const int &  a_dir,
const Box a_box,
GodunovPhysics a_physPtr 
)

Compute high-order face-centered velocity divergence for artificial viscosity.

Computes a face-centered nonlinear function of the divergence suitable for use as an artificial viscosity coefficient for a fourth-order method.

F_visc = -dx*K*dU/dx K = max(-dx*div(u)*min(1,h^2*|div(u)/(c^2)/a_M0sq|),0)

void GodunovUtilities::deconvolve ( FArrayBox a_avgFab,
const FArrayBox a_cellFab,
int  a_sign = 1 
)

Deconvolve from cell-centered to cell-averaged data (or vice versa).

Deconvolves (or convolves, if a_sign = -1) by the formula

a_avgFab += a_sign * laplacian(a_cellFab) * m_dx^2 / 24, on a_cellFab.box()

void GodunovUtilities::deconvolve ( FArrayBox a_avgFab,
const FArrayBox a_cellFab,
const Box a_box,
int  a_sign = 1 
)

Deconvolve from cell-centered to cell-averaged data (or vice versa) on a specified box.

Deconvolves (or convolves, if a_sign = -1) by the formula

a_avgFab += a_sign * laplacian(a_cellFab) * m_dx^2 / 24, on a_box

void GodunovUtilities::deconvolveFace ( FluxBox a_avgFlux,
const FluxBox a_cellFlux,
int  a_sign = 1 
)

Deconvolve from face-centered to face-averaged data (or vice versa).

Deconvolves (or convolves, if a_sign = -1) by the formula

a_avgFlux += a_sign * laplacian(a_cellFlux) * m_dx^2 / 24, on faces of a_cellFlux.box()

void GodunovUtilities::deconvolveFace ( FluxBox a_avgFlux,
const FluxBox a_cellFlux,
const Box a_box,
int  a_sign = 1 
)

Deconvolve from face-centered to face-averaged data (or vice versa) on a specified box.

Deconvolves (or convolves, if a_sign = -1) by the formula

a_avgFlux += a_sign * laplacian(a_cellFlux) * m_dx^2 / 24, on faces of a_box

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


Member Data Documentation


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

Generated on Mon Nov 20 03:43:03 2017 for Chombo + EB by  doxygen 1.5.5