|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|


Go to the source code of this file.
Functions | |
| template<typename InterpType_H , typename InterpType_V , bool FaceValue = false> | |
| void | BuildScalarAdvectionFluxesWithPolicy (const amrex::Box &bx, const amrex::Array4< const amrex::Real > &scalar, const int scalar_comp, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const int flux_comp, const amrex::Array4< const amrex::Real > &avg_xmom, const amrex::Array4< const amrex::Real > &avg_ymom, const amrex::Array4< const amrex::Real > &avg_zmom, const amrex::Array4< const amrex::Real > &upw_x, const amrex::Array4< const amrex::Real > &upw_y, const amrex::Array4< const amrex::Real > &upw_z, const amrex::Real horiz_upw_frac, const amrex::Real vert_upw_frac) |
| template<bool FaceValue = false> | |
| void | BuildScalarAdvectionFluxesCentered2 (const amrex::Box &bx, const amrex::Array4< const amrex::Real > &scalar, const int scalar_comp, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const int flux_comp, const amrex::Array4< const amrex::Real > &avg_xmom, const amrex::Array4< const amrex::Real > &avg_ymom, const amrex::Array4< const amrex::Real > &avg_zmom) |
| template<typename InterpType_H , bool FaceValue = false> | |
| void | BuildScalarAdvectionFluxesVert (const amrex::Box &bx, const amrex::Array4< const amrex::Real > &scalar, const int scalar_comp, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const int flux_comp, const amrex::Array4< const amrex::Real > &avg_xmom, const amrex::Array4< const amrex::Real > &avg_ymom, const amrex::Array4< const amrex::Real > &avg_zmom, const amrex::Array4< const amrex::Real > &upw_x, const amrex::Array4< const amrex::Real > &upw_y, const amrex::Array4< const amrex::Real > &upw_z, const amrex::Real horiz_upw_frac, const amrex::Real vert_upw_frac, const AdvType vert_adv_type) |
| template<bool FaceValue> | |
| void | BuildScalarAdvectionFluxesImpl (const amrex::Box &bx, const amrex::Array4< const amrex::Real > &scalar, const int scalar_comp, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const int flux_comp, const amrex::Array4< const amrex::Real > &avg_xmom, const amrex::Array4< const amrex::Real > &avg_ymom, const amrex::Array4< const amrex::Real > &avg_zmom, const amrex::Array4< const amrex::Real > &upw_x, const amrex::Array4< const amrex::Real > &upw_y, const amrex::Array4< const amrex::Real > &upw_z, const AdvType horiz_adv_type, const AdvType vert_adv_type, const amrex::Real horiz_upw_frac, const amrex::Real vert_upw_frac) |
| void | BuildScalarAdvectionFluxes (const amrex::Box &bx, const amrex::Array4< const amrex::Real > &scalar, const int scalar_comp, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const int flux_comp, const amrex::Array4< const amrex::Real > &avg_xmom, const amrex::Array4< const amrex::Real > &avg_ymom, const amrex::Array4< const amrex::Real > &avg_zmom, const AdvType horiz_adv_type, const AdvType vert_adv_type, const amrex::Real horiz_upw_frac, const amrex::Real vert_upw_frac) |
| void | BuildScalarAdvectionFluxes (const amrex::Box &bx, const amrex::Array4< const amrex::Real > &scalar, const int scalar_comp, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const int flux_comp, const amrex::Array4< const amrex::Real > &avg_xmom, const amrex::Array4< const amrex::Real > &avg_ymom, const amrex::Array4< const amrex::Real > &avg_zmom, const amrex::Array4< const amrex::Real > &upw_x, const amrex::Array4< const amrex::Real > &upw_y, const amrex::Array4< const amrex::Real > &upw_z, const AdvType horiz_adv_type, const AdvType vert_adv_type, const amrex::Real horiz_upw_frac, const amrex::Real vert_upw_frac) |
| void | BuildScalarAdvectionFaceValues (const amrex::Box &bx, const amrex::Array4< const amrex::Real > &scalar, const int scalar_comp, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &face_arr, const int face_comp, const amrex::Array4< const amrex::Real > &xflux, const amrex::Array4< const amrex::Real > &yflux, const amrex::Array4< const amrex::Real > &zflux, const AdvType horiz_adv_type, const AdvType vert_adv_type, const amrex::Real horiz_upw_frac, const amrex::Real vert_upw_frac) |
| void | ApplyScalarAdvectionFluxDivergence (const amrex::Box &bx, const amrex::GpuArray< const amrex::Array4< amrex::Real >, AMREX_SPACEDIM > &flx_arr, const int flux_comp, const amrex::Array4< amrex::Real > &rhs, const int rhs_comp, const amrex::Array4< const amrex::Real > &detJ, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &cellSizeInv, const amrex::Array4< const amrex::Real > &mf_mx, const amrex::Array4< const amrex::Real > &mf_my) |
|
inline |
Apply the mapped divergence of component-selected scalar face fluxes.
| [in] | bx | cell-centered box over which the tendency is computed |
| [in] | flx_arr | face-flux views |
| [in] | flux_comp | component of the supplied face-flux views to read |
| [out] | rhs | supplied tendency view |
| [in] | rhs_comp | component of the supplied tendency view to write |
| [in] | detJ | metric Jacobian |
| [in] | cellSizeInv | inverse grid spacing |
| [in] | mf_mx | x map factor at cell centers |
| [in] | mf_my | y map factor at cell centers |
Referenced by AdvectionSrcForScalars().


|
inline |
The face values of a cell-centered field that BuildScalarAdvectionFluxes would multiply by the mass flux: the same reconstruction, chosen by the same scheme and upwind fraction, with the upwind side picked from the sign of the given mass flux (every scheme uses only its sign, and a zero flux selects the centered blend, as in advection). Writes the face values instead of the fluxes.
| [in] | bx | cell-centered box over whose faces the values are computed |
| [in] | scalar | supplied cell-centered field view |
| [in] | scalar_comp | component of the supplied field view to reconstruct |
| [out] | face_arr | face-value views |
| [in] | face_comp | component of the supplied face-value views to write |
| [in] | xflux | x-face mass flux (its sign picks the upwind side) |
| [in] | yflux | y-face mass flux (its sign picks the upwind side) |
| [in] | zflux | z-face mass flux (its sign picks the upwind side) |
| [in] | horiz_adv_type | horizontal advection scheme |
| [in] | vert_adv_type | vertical advection scheme |
| [in] | horiz_upw_frac | horizontal upwind blending fraction |
| [in] | vert_upw_frac | vertical upwind blending fraction |
Referenced by MakeAdvectiveProjectionWeights().

|
inline |
Build scalar face fluxes using ERF's compile-time interpolation policies. WENO schemes intentionally use the same policy horizontally and vertically, matching the existing native scalar-advection dispatch.
| [in] | bx | cell-centered box over which scalar fluxes are computed |
| [in] | scalar | supplied cell-centered scalar view |
| [in] | scalar_comp | component of the supplied scalar view to reconstruct |
| [out] | flx_arr | face-flux views |
| [in] | flux_comp | component of the supplied face-flux views to write |
| [in] | avg_xmom | x-component of time-averaged mass flux |
| [in] | avg_ymom | y-component of time-averaged mass flux |
| [in] | avg_zmom | z-component of time-averaged mass flux |
| [in] | horiz_adv_type | horizontal advection scheme |
| [in] | vert_adv_type | vertical advection scheme |
| [in] | horiz_upw_frac | horizontal upwind blending fraction |
| [in] | vert_upw_frac | vertical upwind blending fraction |
Referenced by erf_sbm::SBMTransport::advance_stage(), erf_auxiliary::AuxiliaryInertTracer::advance_stage(), and AdvectionSrcForScalars().

|
inline |
As above, but with the upwind side on each face picked from the sign of upw_x, upw_y and upw_z instead of the sign of the mass flux. A pseudo-incompressible level passes the upwind direction its projection set (see ERF::pi_upw_dir), so that theta is reconstructed on each face exactly as the projection reconstructed rho0 theta0 / rho.
| [in] | bx | cell-centered box over which scalar fluxes are computed |
| [in] | scalar | supplied cell-centered scalar view |
| [in] | scalar_comp | component of the supplied scalar view to reconstruct |
| [out] | flx_arr | face-flux views |
| [in] | flux_comp | component of the supplied face-flux views to write |
| [in] | avg_xmom | x-component of time-averaged mass flux |
| [in] | avg_ymom | y-component of time-averaged mass flux |
| [in] | avg_zmom | z-component of time-averaged mass flux |
| [in] | upw_x | x-face field whose sign picks the upwind side |
| [in] | upw_y | y-face field whose sign picks the upwind side |
| [in] | upw_z | z-face field whose sign picks the upwind side |
| [in] | horiz_adv_type | horizontal advection scheme |
| [in] | vert_adv_type | vertical advection scheme |
| [in] | horiz_upw_frac | horizontal upwind blending fraction |
| [in] | vert_upw_frac | vertical upwind blending fraction |
|
inline |
Build centered-second-order scalar face fluxes without a reconstruction temporary.
| FaceValue | write face values instead of fluxes |
| [in] | bx | cell-centered box over which scalar fluxes are computed |
| [in] | scalar | supplied cell-centered scalar view |
| [in] | scalar_comp | component of the supplied scalar view to reconstruct |
| [out] | flx_arr | face-flux views |
| [in] | flux_comp | component of the supplied face-flux views to write |
| [in] | avg_xmom | x-component of time-averaged mass flux |
| [in] | avg_ymom | y-component of time-averaged mass flux |
| [in] | avg_zmom | z-component of time-averaged mass flux |

|
inline |
Dispatch shared by BuildScalarAdvectionFluxes (FaceValue = false: write the mass flux times the reconstructed face value) and BuildScalarAdvectionFaceValues (FaceValue = true: write the reconstructed face value itself).
| FaceValue | write face values instead of fluxes |
| [in] | bx | cell-centered box over which scalar fluxes are computed |
| [in] | scalar | supplied cell-centered scalar view |
| [in] | scalar_comp | component of the supplied scalar view to reconstruct |
| [out] | flx_arr | face-flux (or face-value) views |
| [in] | flux_comp | component of the supplied face views to write |
| [in] | avg_xmom | x-component of time-averaged mass flux |
| [in] | avg_ymom | y-component of time-averaged mass flux |
| [in] | avg_zmom | z-component of time-averaged mass flux |
| [in] | upw_x | x-face field whose sign picks the upwind side (the mass flux, or a direction) |
| [in] | upw_y | y-face field whose sign picks the upwind side |
| [in] | upw_z | z-face field whose sign picks the upwind side |
| [in] | horiz_adv_type | horizontal advection scheme |
| [in] | vert_adv_type | vertical advection scheme |
| [in] | horiz_upw_frac | horizontal upwind blending fraction |
| [in] | vert_upw_frac | vertical upwind blending fraction |
|
inline |
Dispatch scalar face-flux construction for a selected vertical scheme.
| InterpType_H | horizontal interpolation type |
| FaceValue | write face values instead of fluxes |
| [in] | bx | cell-centered box over which scalar fluxes are computed |
| [in] | scalar | supplied scalar view |
| [in] | scalar_comp | component of the supplied scalar view to reconstruct |
| [out] | flx_arr | face-flux views |
| [in] | flux_comp | component of the supplied face-flux views to write |
| [in] | avg_xmom | x-component of time-averaged mass flux |
| [in] | avg_ymom | y-component of time-averaged mass flux |
| [in] | avg_zmom | z-component of time-averaged mass flux |
| [in] | upw_x | x-face field whose sign picks the upwind side (the mass flux, or a direction) |
| [in] | upw_y | y-face field whose sign picks the upwind side |
| [in] | upw_z | z-face field whose sign picks the upwind side |
| [in] | horiz_upw_frac | horizontal upwind blending fraction |
| [in] | vert_upw_frac | vertical upwind blending fraction |
| [in] | vert_adv_type | vertical advection scheme |
|
inline |
Build scalar face fluxes with a selected pair of interpolation policies.
| InterpType_H | horizontal interpolation type |
| InterpType_V | vertical interpolation type |
| FaceValue | write face values instead of fluxes |
| [in] | bx | cell-centered box over which scalar fluxes are computed |
| [in] | scalar | supplied cell-centered scalar view |
| [in] | scalar_comp | component of the supplied scalar view to reconstruct |
| [out] | flx_arr | face-flux views |
| [in] | flux_comp | component of the supplied face-flux views to write |
| [in] | avg_xmom | x-component of time-averaged mass flux |
| [in] | avg_ymom | y-component of time-averaged mass flux |
| [in] | avg_zmom | z-component of time-averaged mass flux |
| [in] | upw_x | x-face field whose sign picks the upwind side (the mass flux, or a direction) |
| [in] | upw_y | y-face field whose sign picks the upwind side |
| [in] | upw_z | z-face field whose sign picks the upwind side |
| [in] | horiz_upw_frac | horizontal upwind blending fraction |
| [in] | vert_upw_frac | vertical upwind blending fraction |
