Chombo + EB + MF
3.2
|
#include "REAL.H"
#include "DisjointBoxLayout.H"
#include "LevelData.H"
#include "FArrayBox.H"
#include "FluxBox.H"
#include "MayDay.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
Go to the source code of this file.
Macros | |
#define | _FOURTHORDERUTIL_H_ |
Functions | |
void | fourthOrderCellToFaceCenters (LevelData< FluxBox > &a_faceData, const LevelData< FArrayBox > &a_cellData) |
utility functions for 4th-order computations More... | |
void | fourthOrderCellToFaceCenters (FluxBox &a_faceData, const FArrayBox &a_cellData) |
void | fourthOrderCellToFaceCenters (FArrayBox &a_faceData, const FArrayBox &a_cellData, const Box &a_faceBox, int a_dir) |
void | fourthOrderCellToFace (LevelData< FluxBox > &a_faceData, const LevelData< FArrayBox > &a_cellData) |
void | fourthOrderCellToFace (FluxBox &a_faceData, const FArrayBox &a_cellData) |
void | fourthOrderCellToFace (FArrayBox &a_faceData, const FArrayBox &a_cellData, const Box &a_faceBox, int a_dir) |
void | fourthOrderAverage (LevelData< FluxBox > &a_phi, int a_sgn=1) |
void | fourthOrderAverage (LevelData< FArrayBox > &a_phi, int a_sgn=1) |
void | fourthOrderAverage (LevelData< FArrayBox > &a_phi, const ProblemDomain &a_domain, int a_sgn=1) |
void | fourthOrderAverageCell (FArrayBox &a_phi, int a_sgn=1) |
void | fourthOrderAverageCell (FArrayBox &a_phi, const ProblemDomain &a_domain, const Box &a_bx, int a_sgn=1) |
void | fourthOrderAverageFace (FluxBox &a_phi, int a_sgn=1) |
void | fourthOrderAverageCenterFace (FArrayBox &a_phiAvg, const FArrayBox &a_phiCen, int a_dir, int a_sgn=1) |
void | fourthOrderMultFace (FluxBox &a_uTimesV, const FluxBox &a_u, const FluxBox &a_v, int a_sgn=1) |
compute fourth-order approximation to u*v More... | |
void | fourthOrderMultFace (FArrayBox &a_uTimesV, const FArrayBox &a_u, const FArrayBox &a_uForDx, const FArrayBox &a_v, const FArrayBox &a_vForDx, int a_faceDir, int a_sgn=1) |
compute fourth-order approximation to u*v More... | |
void | fourthOrderMult (LevelData< FluxBox > &a_uTimesV, const LevelData< FluxBox > &a_u, const LevelData< FluxBox > &a_v, int a_sgn=1) |
compute fourth-order approximation to u*v More... | |
void | fourthOrderCellProd (LevelData< FArrayBox > &a_uTimesV, const LevelData< FArrayBox > &a_u, const LevelData< FArrayBox > &a_v) |
compute fourth-order approximation to u*v More... | |
void | fourthOrderCellProd (FArrayBox &a_FG, const FArrayBox &a_F, const FArrayBox &a_G, const Box &a_box, const ProblemDomain &a_domain, const bool a_oneSidedDG=false, Interval a_fixedDims=Interval()) |
Computes <FG> from <F> and <G> using 1-sided derivatives at boundaries. More... | |
void | incrementGradProduct (FArrayBox &a_gradProduct, const FArrayBox &a_u, const FArrayBox &a_v, const Box &a_region, Real a_dx, Real a_factor, int a_dir) |
this is just a basic wrapper around the INCREMENTGRADPROD fortran More... | |
void | fourthOrderCellExtrapAtDomainBdry (FArrayBox &a_data, const ProblemDomain &a_domain, const Box &a_interiorbox) |
Fourth-order extrapolate cell-averaged interior data to two ghost cell layers at the domain boundary. More... | |
void | fourthOrderCellGhostFill (LevelData< FArrayBox > &a_data, const ProblemDomain &a_domain) |
Fill interior ghost cells and boundary ghost cell via extrapolation of cell-averaged data. More... | |
void | fourthOrderCellExtrap (FArrayBox &a_data, const Box &a_srcbox) |
void | secondOrderCellExtrap (FArrayBox &a_data, const Box &a_srcbox) |
void | secondOrderCellExtrap (FArrayBox &a_data, const Box &a_srcbox, int a_dir) |
void | secondOrderCellExtrapAtDomainBdry (FArrayBox &a_data, const Box &a_interiorbox, const ProblemDomain &a_domain) |
Second-order extrapolate at domain boundary (in all directions) More... | |
void | secondOrderTransExtrap (FArrayBox &a_data, const int a_dir, const Box &a_srcbox) |
Second-order extrapolate data in transverse directions. More... | |
void | secondOrderTransExtrapAtDomainBdry (FArrayBox &a_data, const int a_dir, const Box &a_interiorbox, const ProblemDomain &a_domain) |
Second-order extrapolate data in transverse directions at domain boundary. More... | |
void | secondOrderTransExtrapFacesAtDomainBdry (FArrayBox &a_data, const int a_dir, const Box &a_interiorbox, const ProblemDomain &a_domain) |
Second-order extrapolate data to faces in transverse directions at domain boundary. More... | |
void | zerothOrderCellExtrapAtDomainBdry (FArrayBox &a_data, const Box &a_interiorbox, const ProblemDomain &a_domain) |
Zeroth-order extrapolate at domain boundary (in all directions) More... | |
void | averageTransverseN (FArrayBox &a_Nface, const FArrayBox &a_NtransverseFace, const Box &a_box, const int a_faceDir, const int a_transverseDir) |
Determine transverse components of N by averaging from nearby faces. More... | |
void | cellFGToCellF (FArrayBox &a_F, const FArrayBox &a_FG, const FArrayBox &a_G, const Box &a_box) |
Convert from <FG> and <G> to <F>. More... | |
void | cellFGToCellF (FArrayBox &a_F, const FArrayBox &a_FG, const FArrayBox &a_G, const Box &a_box, const ProblemDomain &a_domain, const bool a_oneSidedDG=false, Interval a_fixedDims=Interval()) |
Computes <F> from <FG> and <G> using 1-sided derivatives at boundaries. More... | |
#define _FOURTHORDERUTIL_H_ |
void fourthOrderCellToFaceCenters | ( | LevelData< FluxBox > & | a_faceData, |
const LevelData< FArrayBox > & | a_cellData | ||
) |
utility functions for 4th-order computations
convert from cell centers to face centers: phi[i+1/2] = 9/16*(phi[i] + phi[i+1]) - 1/16*(phi[i-1] + phi[i+2])
convert from cell centers to face centers: phi[i+1/2] = 9/16*(phi[i] + phi[i+1]) - 1/16*(phi[i-1] + phi[i+2])
void fourthOrderCellToFaceCenters | ( | FArrayBox & | a_faceData, |
const FArrayBox & | a_cellData, | ||
const Box & | a_faceBox, | ||
int | a_dir | ||
) |
convert from cell centers to face centers: phi[i+1/2] = 9/16*(phi[i] + phi[i+1]) - 1/16*(phi[i-1] + phi[i+2])
void fourthOrderCellToFace | ( | LevelData< FluxBox > & | a_faceData, |
const LevelData< FArrayBox > & | a_cellData | ||
) |
convert from cell averages to face averages: phi[i+1/2] = 7/12*(phi[i] + phi[i+1]) - 1/12*(phi[i-1] + phi[i+2])
convert from cell averages to face averages: phi[i+1/2] = 7/12*(phi[i] + phi[i+1]) - 1/12*(phi[i-1] + phi[i+2])
void fourthOrderCellToFace | ( | FArrayBox & | a_faceData, |
const FArrayBox & | a_cellData, | ||
const Box & | a_faceBox, | ||
int | a_dir | ||
) |
convert from cell averages to face averages: phi[i+1/2] = 7/12*(phi[i] + phi[i+1]) - 1/12*(phi[i-1] + phi[i+2])
given face-centered phi, increment with Laplacian(phi) correction in place to compute 4th-order face averages of phi (or decrement, a_sgn = -1, to compute face-centered from face-averaged)
given cell-centered phi, increment with Laplacian(phi) correction in place to compute 4th-order cell averages of phi (or decrement, a_sgn = -1, to compute cell-centered from cell-averaged)
void fourthOrderAverage | ( | LevelData< FArrayBox > & | a_phi, |
const ProblemDomain & | a_domain, | ||
int | a_sgn = 1 |
||
) |
given cell-centered phi, increment with Laplacian(phi) correction in place to compute 4th-order cell averages of phi (or decrement, a_sgn = -1, to compute cell-centered from cell-averaged) using one-sided corrections at domain boundaries
void fourthOrderAverageCell | ( | FArrayBox & | a_phi, |
int | a_sgn = 1 |
||
) |
given cell-centered phi, increment with Laplacian(phi) correction in place to compute 4th-order cell averages of phi (or decrement, a_sgn = -1, to compute cell-centered from cell-averaged)
void fourthOrderAverageCell | ( | FArrayBox & | a_phi, |
const ProblemDomain & | a_domain, | ||
const Box & | a_bx, | ||
int | a_sgn = 1 |
||
) |
given cell-centered phi, increment with Laplacian(phi) correction in place to compute 4th-order cell averages of phi (or decrement, a_sgn = -1, to compute cell-centered from cell-averaged) using one-sided corrections at domain boundaries
void fourthOrderAverageFace | ( | FluxBox & | a_phi, |
int | a_sgn = 1 |
||
) |
given face-centered phi, increment with Laplacian(phi) correction in place to compute 4th-order face averages of phi (or decrement, a_sgn = -1, to compute face-centered from face-averaged)
void fourthOrderAverageCenterFace | ( | FArrayBox & | a_phiAvg, |
const FArrayBox & | a_phiCen, | ||
int | a_dir, | ||
int | a_sgn = 1 |
||
) |
replace a_phiAvg by a_phiCen + a_sgn * D^2_(a_dir)(a_phiAvg)
void fourthOrderMultFace | ( | FluxBox & | a_uTimesV, |
const FluxBox & | a_u, | ||
const FluxBox & | a_v, | ||
int | a_sgn = 1 |
||
) |
compute fourth-order approximation to u*v
u and v are assumed to already be fourth-order face-averages
void fourthOrderMultFace | ( | FArrayBox & | a_uTimesV, |
const FArrayBox & | a_u, | ||
const FArrayBox & | a_uForDx, | ||
const FArrayBox & | a_v, | ||
const FArrayBox & | a_vForDx, | ||
int | a_faceDir, | ||
int | a_sgn = 1 |
||
) |
compute fourth-order approximation to u*v
u and v are assumed to already be fourth-order face-averages
void fourthOrderMult | ( | LevelData< FluxBox > & | a_uTimesV, |
const LevelData< FluxBox > & | a_u, | ||
const LevelData< FluxBox > & | a_v, | ||
int | a_sgn = 1 |
||
) |
compute fourth-order approximation to u*v
u and v are assumed to already be fourth-order face-averages
void fourthOrderCellProd | ( | LevelData< FArrayBox > & | a_uTimesV, |
const LevelData< FArrayBox > & | a_u, | ||
const LevelData< FArrayBox > & | a_v | ||
) |
compute fourth-order approximation to u*v
u and v are assumed to already be fourth-order cell-averages
void fourthOrderCellProd | ( | FArrayBox & | a_FG, |
const FArrayBox & | a_F, | ||
const FArrayBox & | a_G, | ||
const Box & | a_box, | ||
const ProblemDomain & | a_domain, | ||
const bool | a_oneSidedDG = false , |
||
Interval | a_fixedDims = Interval() |
||
) |
Computes <FG> from <F> and <G> using 1-sided derivatives at boundaries.
void incrementGradProduct | ( | FArrayBox & | a_gradProduct, |
const FArrayBox & | a_u, | ||
const FArrayBox & | a_v, | ||
const Box & | a_region, | ||
Real | a_dx, | ||
Real | a_factor, | ||
int | a_dir | ||
) |
this is just a basic wrapper around the INCREMENTGRADPROD fortran
void fourthOrderCellExtrapAtDomainBdry | ( | FArrayBox & | a_data, |
const ProblemDomain & | a_domain, | ||
const Box & | a_interiorbox | ||
) |
Fourth-order extrapolate cell-averaged interior data to two ghost cell layers at the domain boundary.
At the domain boundary, perform a fourth-order extrapolation of cell-averaged interior data to fill two layers of ghost cells (we assume an exchange will be performed elsewhere to fill interior ghost cells). Among other possible uses, this enables the fourthOrderCellToFace utility to then be called without worrying about boundaries.
void fourthOrderCellGhostFill | ( | LevelData< FArrayBox > & | a_data, |
const ProblemDomain & | a_domain | ||
) |
Fill interior ghost cells and boundary ghost cell via extrapolation of cell-averaged data.
Fill interior ghost cells by copying and boundary ghost cells by extrapolation of cell-averaged data
Perform a fourth-order extrapolation of cell-averaged a_data values in a_srcbox to set the values of a_data in the adjacent width-two boxes on the low and high sides of a_srcbox.
Perform a second-order extrapolation of a_data values in a_srcbox to set the values of a_data in the adjacent width-one boxes on the low and high sides of a_srcbox in all dimensions.
Perform a second-order extrapolation of a_data values in a_srcbox to set the values of a_data in the adjacent width-one boxes on the low and high sides of a_srcbox in dimension a_dir.
void secondOrderCellExtrapAtDomainBdry | ( | FArrayBox & | a_data, |
const Box & | a_interiorbox, | ||
const ProblemDomain & | a_domain | ||
) |
Second-order extrapolate at domain boundary (in all directions)
Perform a second-order extrapolation of a_data values in a_srcbox to set the values of a_data in the adjacent width-one boxes on the low and high sides of a_srcbox. The extrapolation is only performed if the adjacent width-one boxes lie outside the domain box (i.e., are physical boundary ghost cells).
Second-order extrapolate data in transverse directions.
Perform a second-order extrapolation of the input a_data from the a_srcbox box to adjacent destination boxes of width one on the low and high sides of srcbox in the directions transverse to a_dir. This can be used, for example, to fill ghost cells prior to computing the transverse gradients (relative to the a_dir direction) on cell faces via the product formula (for computing the fourth-order average of a product in terms of the averages of each factor).
void secondOrderTransExtrapAtDomainBdry | ( | FArrayBox & | a_data, |
const int | a_dir, | ||
const Box & | a_interiorbox, | ||
const ProblemDomain & | a_domain | ||
) |
Second-order extrapolate data in transverse directions at domain boundary.
Perform a second-order extrapolation of the input a_data from the a_interiorbox box to adjacent destination boxes of width one on the low and high sides of a_interiorbox in the directions transverse to dir. The extrapolation is only performed if the adjacent width-one boxes lie outside the domain box (i.e., are physical boundary ghost cells). This can be used to fill ghost cells prior to computing the transverse gradients (relative to the a_dir direction) on cell faces via the product formula (for computing the fourth-order average of a product in terms of the averages of each factor).
void secondOrderTransExtrapFacesAtDomainBdry | ( | FArrayBox & | a_data, |
const int | a_dir, | ||
const Box & | a_interiorbox, | ||
const ProblemDomain & | a_domain | ||
) |
Second-order extrapolate data to faces in transverse directions at domain boundary.
Perform a second-order extrapolation of the input a_data from faces of a_interiorbox to adjacent destination boxes of width one on the low and high sides of a_interiorbox in the directions transverse to dir. The extrapolation is only performed if the adjacent width-one boxes lie outside the domain box (i.e., are physical boundary ghost faces).
void zerothOrderCellExtrapAtDomainBdry | ( | FArrayBox & | a_data, |
const Box & | a_interiorbox, | ||
const ProblemDomain & | a_domain | ||
) |
Zeroth-order extrapolate at domain boundary (in all directions)
Perform a zeroth-order extrapolation of a_data values in a_srcbox to set the values of a_data in the adjacent width-one boxes on the low and high sides of a_srcbox. The extrapolation is only performed if the adjacent width-one boxes lie outside the domain box (i.e., are physical boundary ghost cells).
void averageTransverseN | ( | FArrayBox & | a_Nface, |
const FArrayBox & | a_NtransverseFace, | ||
const Box & | a_box, | ||
const int | a_faceDir, | ||
const int | a_transverseDir | ||
) |
Determine transverse components of N by averaging from nearby faces.
void cellFGToCellF | ( | FArrayBox & | a_F, |
const FArrayBox & | a_FG, | ||
const FArrayBox & | a_G, | ||
const Box & | a_box | ||
) |
Convert from <FG> and <G> to <F>.