#include <GodunovUtilities.H>
Public Member Functions | |
GodunovUtilities () | |
Constructor. | |
~GodunovUtilities () | |
Destructor. | |
void | define (ProblemDomain &a_domain, const Real &a_dx) |
Define the object. | |
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 | 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+). | |
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 | 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 | PPMFaceValuesunused (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) |
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 | 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. | |
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 | 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. | |
void | highOrderLimiter (bool a_highOrderLimiter) |
Set whether to use high-order limiter. | |
void | deconvolve (FArrayBox &a_avgFab, const FArrayBox &a_cellFab, int a_sign=1) |
a_avgFab += a_sign * laplacian(a_cellFab) * m_dx^2 / 24 | |
void | deconvolveFace (FluxBox &a_avgFlux, const FluxBox &a_cellFlux, int a_sign=1) |
a_avgFlux += a_sign * laplacian(a_cellFlux) * m_dx^2 / 24 | |
Protected Attributes | |
ProblemDomain | m_domain |
Real | m_dx |
bool | m_isDefined |
bool | m_highOrderLimiter |
Private Member Functions | |
void | operator= (const GodunovUtilities &a_input) |
GodunovUtilities (const GodunovUtilities &a_input) |
GodunovUtilities::GodunovUtilities | ( | ) |
Constructor.
GodunovUtilities::~GodunovUtilities | ( | ) |
Destructor.
GodunovUtilities::GodunovUtilities | ( | const GodunovUtilities & | a_input | ) | [inline, private] |
References MayDay::Error().
void GodunovUtilities::define | ( | ProblemDomain & | a_domain, | |
const Real & | a_dx | |||
) |
Define the object.
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.
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.
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::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::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::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::PPMFaceValuesunused | ( | 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 | |||
) |
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.
On input, dWMinus and dWPlus are the differences between the face values on the minus and plus sides of cells and the average in the cell. The PPM limiter is applied to these values to obtain a monotone interpolant in the cell. petermc, 4 Sep 2008: included a_W in argument list
If m_highOrderLimiter, then we need to have a_dWMinus and a_dWPlus on a_box, and we need to have a_W on on a_box grown by 2 in dimension a_dir.
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::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 for faces in the direction a_dir. The velocities are the components a_velInterval of a_W.
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::highOrderLimiter | ( | bool | a_highOrderLimiter | ) |
Set whether to use high-order limiter.
void GodunovUtilities::deconvolve | ( | FArrayBox & | a_avgFab, | |
const FArrayBox & | a_cellFab, | |||
int | a_sign = 1 | |||
) |
a_avgFab += a_sign * laplacian(a_cellFab) * m_dx^2 / 24
void GodunovUtilities::deconvolveFace | ( | FluxBox & | a_avgFlux, | |
const FluxBox & | a_cellFlux, | |||
int | a_sign = 1 | |||
) |
a_avgFlux += a_sign * laplacian(a_cellFlux) * m_dx^2 / 24
void GodunovUtilities::operator= | ( | const GodunovUtilities & | a_input | ) | [inline, private] |
References MayDay::Error().
ProblemDomain GodunovUtilities::m_domain [protected] |
Real GodunovUtilities::m_dx [protected] |
bool GodunovUtilities::m_isDefined [protected] |
bool GodunovUtilities::m_highOrderLimiter [protected] |