|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include "AMReX_MultiFab.H"#include "AMReX_BCRec.H"#include "AMReX_YAFluxRegister.H"#include "AMReX_MultiCutFab.H"#include "AMReX_EBMultiFabUtil.H"#include "ERF_DataStruct.H"#include "ERF_IndexDefines.H"#include "ERF_SurfaceLayer.H"#include "ERF_Advection.H"#include "ERF_Diffusion.H"#include "ERF_EddyViscosity.H"#include "ERF_TerrainMetrics.H"#include "ERF_TileNoZ.H"#include "ERF_EB.H"#include "ERF_ReadBndryPlanes.H"#include "Prob/ERF_CloudChamber.H"

Go to the source code of this file.
Namespaces | |
| erf_auxiliary | |
| erf_sbm | |
Functions | |
| amrex::Real | StageFluxWeight (const SolverChoice &solverChoice, int level, int nrk) |
| amrex::Real | RefluxStageWeight (const SolverChoice &solverChoice, int level, int finest_level, int nrk) |
| bool | IsRefluxStage (const SolverChoice &solverChoice, int level, int finest_level, int nrk) |
| void | erf_make_tau_terms (int level, int nrk, const amrex::Vector< amrex::BCRec > &domain_bcs_type, const amrex::MultiFab &z_phys_nd, amrex::Vector< amrex::MultiFab > &S_data, const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &zvel, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_lev, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_corr_lev, amrex::MultiFab *SmnSmn, amrex::MultiFab *eddyDiffs, const amrex::Geometry geom, const SolverChoice &solverChoice, const amrex::Vector< std::unique_ptr< SurfaceLayer >> &SurfLayer, amrex::Gpu::DeviceVector< amrex::Real > &stretched_dz_d, const amrex::MultiFab &detJ, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &mapfac, const amrex::MultiFab &ax, const amrex::MultiFab &ay, const amrex::MultiFab &az, const eb_ &ebfact, const amrex::MultiFab *ib_wall_face13=nullptr, const amrex::MultiFab *ib_wall_face23=nullptr) |
| void | copy_surface_tau_for_implicit (amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_lev, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_corr_lev) |
| void | erf_slow_rhs_pre (int level, int finest_level, int nrk, double dt, amrex::Vector< amrex::MultiFab > &S_rhs, amrex::Vector< amrex::MultiFab > &S_old, amrex::Vector< amrex::MultiFab > &S_data, const amrex::MultiFab &S_prim, const amrex::MultiFab &qt, amrex::MultiFab &avg_xmom, amrex::MultiFab &avg_ymom, amrex::MultiFab &avg_zmom, const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &zvel, std::unique_ptr< amrex::MultiFab > &z_t, const amrex::MultiFab &cc_src, const amrex::MultiFab &xmom_src, const amrex::MultiFab &ymom_src, const amrex::MultiFab &zmom_src, const amrex::MultiFab &buoyancy, const amrex::MultiFab *zmom_crse_rhs, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_lev, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Tau_corr_lev, amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> &Tau_EB, amrex::MultiFab *SmnSmn, amrex::MultiFab *eddyDiffs, amrex::MultiFab *Hfx1, amrex::MultiFab *Hfx2, amrex::MultiFab *Hfx3, amrex::MultiFab *Q1fx1, amrex::MultiFab *Q1fx2, amrex::MultiFab *Q1fx3, amrex::MultiFab *Q2fx3, amrex::MultiFab *Diss, amrex::MultiFab *mf_surface_fluxes, amrex::MultiFab *Hfx3_EB, const amrex::Geometry geom, const SolverChoice &solverChoice, const amrex::Vector< std::unique_ptr< SurfaceLayer >> &SurfLayer, const amrex::Gpu::DeviceVector< amrex::BCRec > &domain_bcs_type_d, const amrex::Vector< amrex::BCRec > &domain_bcs_type, const amrex::MultiFab &z_phys_nd, const amrex::MultiFab &z_phys_cc, const amrex::MultiFab &ax, const amrex::MultiFab &ay, const amrex::MultiFab &az, const amrex::MultiFab &dJ, amrex::Gpu::DeviceVector< amrex::Real > &stretched_dz_d, amrex::Vector< amrex::MultiFab > &gradp, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &mapfac, const eb_ &ebfact, ShocDriver *native_shoc_lev, amrex::YAFluxRegister *fr_as_crse, amrex::YAFluxRegister *fr_as_fine, const amrex::MultiFab *cloud_chamber_base_state, const erf_cloud_chamber::Config *cloud_chamber_config, CloudChamberBudget *cloud_budget, const amrex::MultiFab *ib_wall_face13=nullptr, const amrex::MultiFab *ib_wall_face23=nullptr, const amrex::MultiFab *ib_wall_face33=nullptr, const amrex::MultiFab *ib_wall_hfx=nullptr) |
| void | erf_slow_rhs_post (int level, int finest_level, int nrk, double step_old_time, double input_time, double target_time, double dt, int n_qstate, amrex::Vector< amrex::MultiFab > &S_rhs, amrex::Vector< amrex::MultiFab > &S_old, amrex::Vector< amrex::MultiFab > &S_new, amrex::Vector< amrex::MultiFab > &S_data, const amrex::MultiFab &S_prim, amrex::MultiFab &avg_xmom, amrex::MultiFab &avg_ymom, amrex::MultiFab &avg_zmom, const amrex::MultiFab &xvel, const amrex::MultiFab &yvel, const amrex::MultiFab &zvel, const amrex::MultiFab &source, amrex::MultiFab *terrain_blank, amrex::MultiFab *terrain_blank_xface, amrex::MultiFab *terrain_blank_yface, amrex::MultiFab *terrain_blank_zface, const amrex::MultiFab *SmnSmn, const amrex::MultiFab *eddyDiffs, amrex::MultiFab *Hfx1, amrex::MultiFab *Hfx2, amrex::MultiFab *Hfx3, amrex::MultiFab *Q1fx1, amrex::MultiFab *Q1fx2, amrex::MultiFab *Q1fx3, amrex::MultiFab *Q2fx3, amrex::MultiFab *Diss, amrex::MultiFab *Tau13, amrex::MultiFab *Tau23, const amrex::Geometry geom, const SolverChoice &solverChoice, const amrex::Vector< std::unique_ptr< SurfaceLayer >> &SurfLayer, const amrex::Gpu::DeviceVector< amrex::BCRec > &domain_bcs_type_d, const amrex::Vector< amrex::BCRec > &domain_bcs_type, std::unique_ptr< amrex::MultiFab > &z_phys_nd, std::unique_ptr< amrex::MultiFab > &z_phys_cc, std::unique_ptr< amrex::MultiFab > &ax, std::unique_ptr< amrex::MultiFab > &ay, std::unique_ptr< amrex::MultiFab > &az, std::unique_ptr< amrex::MultiFab > &dJ_old, amrex::MultiFab *dJ_new, amrex::Gpu::DeviceVector< amrex::Real > &stretched_dz_d, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &mapfac, const eb_ &ebfact, ShocDriver *native_shoc_lev, amrex::YAFluxRegister *fr_as_crse, amrex::YAFluxRegister *fr_as_fine, std::unique_ptr< ReadBndryPlanes > &m_r2d, const amrex::MultiFab *cloud_chamber_base_state, const erf_cloud_chamber::Config *cloud_chamber_config, CloudChamberBudget *cloud_budget, erf_auxiliary::AuxiliaryInertTracer *auxiliary_inert_tracer, erf_sbm::SBMStateManager *sbm_state_manager, erf_sbm::SBMTransport *sbm_transport, const amrex::MultiFab *ib_wall_face33=nullptr, const amrex::MultiFab *ib_wall_ktarget=nullptr) |
| void copy_surface_tau_for_implicit | ( | amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Tau_lev, |
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Tau_corr_lev | ||
| ) |
| void erf_make_tau_terms | ( | int | level, |
| int | nrk, | ||
| const amrex::Vector< amrex::BCRec > & | domain_bcs_type, | ||
| const amrex::MultiFab & | z_phys_nd, | ||
| amrex::Vector< amrex::MultiFab > & | S_data, | ||
| const amrex::MultiFab & | xvel, | ||
| const amrex::MultiFab & | yvel, | ||
| const amrex::MultiFab & | zvel, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Tau_lev, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Tau_corr_lev, | ||
| amrex::MultiFab * | SmnSmn, | ||
| amrex::MultiFab * | eddyDiffs, | ||
| const amrex::Geometry | geom, | ||
| const SolverChoice & | solverChoice, | ||
| const amrex::Vector< std::unique_ptr< SurfaceLayer >> & | SurfLayer, | ||
| amrex::Gpu::DeviceVector< amrex::Real > & | stretched_dz_d, | ||
| const amrex::MultiFab & | detJ, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | mapfac, | ||
| const amrex::MultiFab & | ax, | ||
| const amrex::MultiFab & | ay, | ||
| const amrex::MultiFab & | az, | ||
| const eb_ & | ebfact, | ||
| const amrex::MultiFab * | ib_wall_face13 = nullptr, |
||
| const amrex::MultiFab * | ib_wall_face23 = nullptr |
||
| ) |
| void erf_slow_rhs_post | ( | int | level, |
| int | finest_level, | ||
| int | nrk, | ||
| double | step_old_time, | ||
| double | input_time, | ||
| double | target_time, | ||
| double | dt, | ||
| int | n_qstate, | ||
| amrex::Vector< amrex::MultiFab > & | S_rhs, | ||
| amrex::Vector< amrex::MultiFab > & | S_old, | ||
| amrex::Vector< amrex::MultiFab > & | S_new, | ||
| amrex::Vector< amrex::MultiFab > & | S_data, | ||
| const amrex::MultiFab & | S_prim, | ||
| amrex::MultiFab & | avg_xmom, | ||
| amrex::MultiFab & | avg_ymom, | ||
| amrex::MultiFab & | avg_zmom, | ||
| const amrex::MultiFab & | xvel, | ||
| const amrex::MultiFab & | yvel, | ||
| const amrex::MultiFab & | zvel, | ||
| const amrex::MultiFab & | source, | ||
| amrex::MultiFab * | terrain_blank, | ||
| amrex::MultiFab * | terrain_blank_xface, | ||
| amrex::MultiFab * | terrain_blank_yface, | ||
| amrex::MultiFab * | terrain_blank_zface, | ||
| const amrex::MultiFab * | SmnSmn, | ||
| const amrex::MultiFab * | eddyDiffs, | ||
| amrex::MultiFab * | Hfx1, | ||
| amrex::MultiFab * | Hfx2, | ||
| amrex::MultiFab * | Hfx3, | ||
| amrex::MultiFab * | Q1fx1, | ||
| amrex::MultiFab * | Q1fx2, | ||
| amrex::MultiFab * | Q1fx3, | ||
| amrex::MultiFab * | Q2fx3, | ||
| amrex::MultiFab * | Diss, | ||
| amrex::MultiFab * | Tau13, | ||
| amrex::MultiFab * | Tau23, | ||
| const amrex::Geometry | geom, | ||
| const SolverChoice & | solverChoice, | ||
| const amrex::Vector< std::unique_ptr< SurfaceLayer >> & | SurfLayer, | ||
| const amrex::Gpu::DeviceVector< amrex::BCRec > & | domain_bcs_type_d, | ||
| const amrex::Vector< amrex::BCRec > & | domain_bcs_type, | ||
| std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| std::unique_ptr< amrex::MultiFab > & | z_phys_cc, | ||
| std::unique_ptr< amrex::MultiFab > & | ax, | ||
| std::unique_ptr< amrex::MultiFab > & | ay, | ||
| std::unique_ptr< amrex::MultiFab > & | az, | ||
| std::unique_ptr< amrex::MultiFab > & | dJ_old, | ||
| amrex::MultiFab * | dJ_new, | ||
| amrex::Gpu::DeviceVector< amrex::Real > & | stretched_dz_d, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | mapfac, | ||
| const eb_ & | ebfact, | ||
| ShocDriver * | native_shoc_lev, | ||
| amrex::YAFluxRegister * | fr_as_crse, | ||
| amrex::YAFluxRegister * | fr_as_fine, | ||
| std::unique_ptr< ReadBndryPlanes > & | m_r2d, | ||
| const amrex::MultiFab * | cloud_chamber_base_state, | ||
| const erf_cloud_chamber::Config * | cloud_chamber_config, | ||
| CloudChamberBudget * | cloud_budget, | ||
| erf_auxiliary::AuxiliaryInertTracer * | auxiliary_inert_tracer, | ||
| erf_sbm::SBMStateManager * | sbm_state_manager, | ||
| erf_sbm::SBMTransport * | sbm_transport, | ||
| const amrex::MultiFab * | ib_wall_face33 = nullptr, |
||
| const amrex::MultiFab * | ib_wall_ktarget = nullptr |
||
| ) |
Function for computing the slow RHS for the evolution equations for the scalars other than density or potential temperature
| void erf_slow_rhs_pre | ( | int | level, |
| int | finest_level, | ||
| int | nrk, | ||
| double | dt, | ||
| amrex::Vector< amrex::MultiFab > & | S_rhs, | ||
| amrex::Vector< amrex::MultiFab > & | S_old, | ||
| amrex::Vector< amrex::MultiFab > & | S_data, | ||
| const amrex::MultiFab & | S_prim, | ||
| const amrex::MultiFab & | qt, | ||
| amrex::MultiFab & | avg_xmom, | ||
| amrex::MultiFab & | avg_ymom, | ||
| amrex::MultiFab & | avg_zmom, | ||
| const amrex::MultiFab & | xvel, | ||
| const amrex::MultiFab & | yvel, | ||
| const amrex::MultiFab & | zvel, | ||
| std::unique_ptr< amrex::MultiFab > & | z_t, | ||
| const amrex::MultiFab & | cc_src, | ||
| const amrex::MultiFab & | xmom_src, | ||
| const amrex::MultiFab & | ymom_src, | ||
| const amrex::MultiFab & | zmom_src, | ||
| const amrex::MultiFab & | buoyancy, | ||
| const amrex::MultiFab * | zmom_crse_rhs, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Tau_lev, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Tau_corr_lev, | ||
| amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab >>> & | Tau_EB, | ||
| amrex::MultiFab * | SmnSmn, | ||
| amrex::MultiFab * | eddyDiffs, | ||
| amrex::MultiFab * | Hfx1, | ||
| amrex::MultiFab * | Hfx2, | ||
| amrex::MultiFab * | Hfx3, | ||
| amrex::MultiFab * | Q1fx1, | ||
| amrex::MultiFab * | Q1fx2, | ||
| amrex::MultiFab * | Q1fx3, | ||
| amrex::MultiFab * | Q2fx3, | ||
| amrex::MultiFab * | Diss, | ||
| amrex::MultiFab * | mf_surface_fluxes, | ||
| amrex::MultiFab * | Hfx3_EB, | ||
| const amrex::Geometry | geom, | ||
| const SolverChoice & | solverChoice, | ||
| const amrex::Vector< std::unique_ptr< SurfaceLayer >> & | SurfLayer, | ||
| const amrex::Gpu::DeviceVector< amrex::BCRec > & | domain_bcs_type_d, | ||
| const amrex::Vector< amrex::BCRec > & | domain_bcs_type, | ||
| const amrex::MultiFab & | z_phys_nd, | ||
| const amrex::MultiFab & | z_phys_cc, | ||
| const amrex::MultiFab & | ax, | ||
| const amrex::MultiFab & | ay, | ||
| const amrex::MultiFab & | az, | ||
| const amrex::MultiFab & | dJ, | ||
| amrex::Gpu::DeviceVector< amrex::Real > & | stretched_dz_d, | ||
| amrex::Vector< amrex::MultiFab > & | gradp, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | mapfac, | ||
| const eb_ & | ebfact, | ||
| ShocDriver * | native_shoc_lev, | ||
| amrex::YAFluxRegister * | fr_as_crse, | ||
| amrex::YAFluxRegister * | fr_as_fine, | ||
| const amrex::MultiFab * | cloud_chamber_base_state, | ||
| const erf_cloud_chamber::Config * | cloud_chamber_config, | ||
| CloudChamberBudget * | cloud_budget, | ||
| const amrex::MultiFab * | ib_wall_face13 = nullptr, |
||
| const amrex::MultiFab * | ib_wall_face23 = nullptr, |
||
| const amrex::MultiFab * | ib_wall_face33 = nullptr, |
||
| const amrex::MultiFab * | ib_wall_hfx = nullptr |
||
| ) |
Function for computing the slow RHS for the evolution equations for the density, potential temperature and momentum.
|
inline |
Whether the fluxes of RK stage nrk at this level go into the flux registers (RefluxStageWeight is not zero).
Referenced by erf_slow_rhs_post(), and erf_slow_rhs_pre().


|
inline |
The weight with which the fluxes of RK stage nrk at this level go into the flux registers: the weight of that stage's fluxes in the update the step ends with, or zero if they are not registered. Only with two-way coupling and more than one level. The compressible integrator and the anelastic MidPoint integrator update from their final stage alone (nrk = 2 and nrk = 1), which takes weight 1. The anelastic RK2 integrator is Heun's, S^{n+1} = S^n + dt (R0 + R1) / 2, so both of its stages take weight 1/2. Every stage that adds fluxes to the registers must use this, so that the registers hold the fluxes the update applied.
| [in] | solverChoice | the solver options |
| [in] | level | the level being advanced |
| [in] | finest_level | the finest level |
| [in] | nrk | the RK stage |
Referenced by erf_slow_rhs_post(), erf_slow_rhs_pre(), and IsRefluxStage().


|
inline |
The weight of the fluxes of RK stage nrk at this level in the update the step ends with. The compressible integrator and the anelastic MidPoint integrator update from their final stage alone (nrk = 2 and nrk = 1), which takes weight 1. The anelastic RK2 integrator is Heun's, S^{n+1} = S^n + dt (R0 + R1) / 2, so both of its stages take weight 1/2.
| [in] | solverChoice | the solver options |
| [in] | level | the level being advanced |
| [in] | nrk | the RK stage |
Referenced by ERF::cf_anelastic_record(), and RefluxStageWeight().
