Chombo + EB + MF  3.2
Macros | Functions
FourthOrderUtil.H File Reference
#include "REAL.H"
#include "DisjointBoxLayout.H"
#include "LevelData.H"
#include "FArrayBox.H"
#include "FluxBox.H"
#include "MayDay.H"
#include "NamespaceHeader.H"
#include "NamespaceFooter.H"
Include dependency graph for FourthOrderUtil.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...
 

Macro Definition Documentation

◆ _FOURTHORDERUTIL_H_

#define _FOURTHORDERUTIL_H_

Function Documentation

◆ fourthOrderCellToFaceCenters() [1/3]

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])

◆ fourthOrderCellToFaceCenters() [2/3]

void fourthOrderCellToFaceCenters ( FluxBox a_faceData,
const FArrayBox a_cellData 
)

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])

◆ fourthOrderCellToFaceCenters() [3/3]

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])

◆ fourthOrderCellToFace() [1/3]

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])

◆ fourthOrderCellToFace() [2/3]

void fourthOrderCellToFace ( FluxBox a_faceData,
const 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])

◆ fourthOrderCellToFace() [3/3]

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])

◆ fourthOrderAverage() [1/3]

void fourthOrderAverage ( LevelData< 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)

◆ fourthOrderAverage() [2/3]

void fourthOrderAverage ( LevelData< 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)

◆ fourthOrderAverage() [3/3]

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

◆ fourthOrderAverageCell() [1/2]

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)

◆ fourthOrderAverageCell() [2/2]

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

◆ fourthOrderAverageFace()

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)

◆ fourthOrderAverageCenterFace()

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)

◆ fourthOrderMultFace() [1/2]

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

◆ fourthOrderMultFace() [2/2]

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

◆ fourthOrderMult()

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

◆ fourthOrderCellProd() [1/2]

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

◆ fourthOrderCellProd() [2/2]

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.

◆ incrementGradProduct()

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

◆ fourthOrderCellExtrapAtDomainBdry()

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.

◆ fourthOrderCellGhostFill()

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

◆ fourthOrderCellExtrap()

void fourthOrderCellExtrap ( FArrayBox a_data,
const Box a_srcbox 
)

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.

◆ secondOrderCellExtrap() [1/2]

void secondOrderCellExtrap ( FArrayBox a_data,
const Box 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.

◆ secondOrderCellExtrap() [2/2]

void secondOrderCellExtrap ( FArrayBox a_data,
const Box a_srcbox,
int  a_dir 
)

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.

◆ secondOrderCellExtrapAtDomainBdry()

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).

◆ secondOrderTransExtrap()

void secondOrderTransExtrap ( FArrayBox a_data,
const int  a_dir,
const Box a_srcbox 
)

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).

◆ secondOrderTransExtrapAtDomainBdry()

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).

◆ secondOrderTransExtrapFacesAtDomainBdry()

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).

◆ zerothOrderCellExtrapAtDomainBdry()

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).

◆ averageTransverseN()

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.

◆ cellFGToCellF() [1/2]

void cellFGToCellF ( FArrayBox a_F,
const FArrayBox a_FG,
const FArrayBox a_G,
const Box a_box 
)

Convert from <FG> and <G> to <F>.

◆ cellFGToCellF() [2/2]

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.