|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <ERF_MOSTAverage.H>

Classes | |
| struct | InterpStencilBounds |
Public Member Functions | |
| MOSTAverage (amrex::Orientation face, amrex::Vector< amrex::Geometry > geom, const bool &has_zphys, std::string a_pp_prefix, const MeshType &m_mesh_type, const TerrainType &m_terrain_type, const amrex::Vector< amrex::Vector< amrex::Real >> &zlevels_stag, const amrex::Vector< const eb_ * > &eb_vec={}) | |
| ~MOSTAverage () | |
| MOSTAverage (MOSTAverage &&) noexcept=default | |
| MOSTAverage & | operator= (MOSTAverage &&other) noexcept=delete |
| MOSTAverage (const MOSTAverage &other)=delete | |
| MOSTAverage & | operator= (const MOSTAverage &other)=delete |
| void | make_MOSTAverage_at_level (const int &lev, const amrex::Vector< amrex::MultiFab * > &vars_old, std::unique_ptr< amrex::MultiFab > &Theta_prim, std::unique_ptr< amrex::MultiFab > &Qv_prim, std::unique_ptr< amrex::MultiFab > &Qr_prim, std::unique_ptr< amrex::MultiFab > &z_phys_nd, const amrex::Vector< std::unique_ptr< amrex::MultiFab >> *mapfac=nullptr) |
| void | update_field_ptrs (const int &lev, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_old, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Theta_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qv_prim, amrex::Vector< std::unique_ptr< amrex::MultiFab >> &Qr_prim) |
| void | set_velocity_field_ptrs (const int &lev, amrex::MultiFab *xvel, amrex::MultiFab *yvel) |
| void | set_rotated_fields (const int &lev) |
| void | set_plane_normalization (const int &lev) |
| void | set_eb_normalization (const int &lev) |
| void | set_region_normalization (const int &) |
| void | set_k_indices_N (const int &lev) |
| void | validate_lateral_reference_stencil (const int &lev) |
| void | set_k_indices_T (const int &lev) |
| void | set_norm_indices_T (const int &lev) |
| void | set_z_positions_T (const int &lev) |
| void | set_z_positions_EB (const int &lev) |
| void | set_norm_positions_T (const int &lev) |
| void | compute_averages (const int &lev) |
| void | compute_plane_averages (const int &lev) |
| void | compute_region_averages (const int &lev) |
| void | compute_eb_averages (const int &lev) |
| void | write_k_indices (const int &lev) |
| void | write_norm_indices (const int &lev) |
| void | write_xz_positions (const int &lev, const int &j) |
| void | write_averages (const int &lev) |
| const amrex::MultiFab * | get_average (const int &lev, const int &comp) const |
| amrex::MultiFab * | get_average (const int &lev, const int &comp) |
| bool | do_time_averaging () const |
| int | get_navg () const |
| bool | time_avg_is_initialized (const int &lev) const |
| void | set_time_avg_initialized (const int &lev) |
| amrex::Vector< amrex::Real > | get_plane_average (const int &lev) const |
| bool | set_plane_average (const int &lev, const amrex::Vector< amrex::Real > &pavg) |
| amrex::MultiFab * | get_zref (const int &lev) const |
| const amrex::MultiFab * | get_field_ptr (const int &lev, const int &comp) const |
| const amrex::iMultiFab * | get_k_indices (const int &lev) const |
| amrex::IntVect | get_ng_fill (const int &lev) const |
| InterpStencilBounds | interp_stencil_bounds (const int &lev, const amrex::MFIter &mfi) const |
| int | max_k_read (const int &lev) const |
| bool | max_k_read_can_change () const |
| void | fill_planar_boundary (const int &lev, amrex::MultiFab &mf) |
| void | fill_zref_planar (const int &lev) |
| void | extrap_ghost_cells (const int &lev, const int &iavg, const amrex::IntVect &ng_fill) |
Static Public Member Functions | |
| AMREX_GPU_HOST_DEVICE static AMREX_INLINE bool | in_cell_z (const amrex::Real &z, const amrex::Real &z_lo, const amrex::Real &z_hi) |
| static int | k_index_below (const amrex::Vector< amrex::Real > &zlevels, const amrex::Real &zref) |
| static amrex::Real | cell_center_height (const amrex::Vector< amrex::Real > &zlevels, const int &k) |
| static amrex::Real | column_height (const amrex::Vector< amrex::Real > &zlevels) |
| AMREX_GPU_HOST_DEVICE static AMREX_INLINE bool | find_interp_height_T (const amrex::Real &xp, const amrex::Real &yp, const amrex::Real &zp, amrex::Array4< amrex::Real const > const &z_arr, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &plo, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxi, amrex::Real &ireal, amrex::Real &jreal, amrex::Real &zval) |
| AMREX_GPU_HOST_DEVICE static AMREX_INLINE void | trilinear_interp_T (const amrex::Real &xp, const amrex::Real &yp, const amrex::Real &zp, amrex::Real *interp_vals, amrex::Array4< amrex::Real const > const &interp_array, amrex::Array4< amrex::Real const > const &z_arr, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &plo, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxi, const int interp_comp) |
Protected Attributes | |
| amrex::Orientation | m_face |
| const amrex::Vector< amrex::Geometry > | m_geom |
| amrex::Vector< amrex::Vector< amrex::MultiFab * > > | m_fields |
| amrex::Vector< amrex::MultiFab * > | m_z_phys_nd |
| amrex::Vector< amrex::Vector< amrex::MultiFab * > > | m_mapfac |
| std::string | m_pp_prefix |
| MeshType | m_mesh_type |
| TerrainType | m_terrain_type |
| amrex::Vector< amrex::Vector< amrex::Real > > | m_zlevels_stag |
| int | m_nvar {6} |
| int | m_navg {9} |
| int | m_maxlev {0} |
| int | m_policy {0} |
| bool | m_rotate {false} |
| amrex::Vector< std::unique_ptr< amrex::MultiFab > > | m_zref |
| amrex::Vector< std::unique_ptr< amrex::MultiFab > > | m_x_pos |
| amrex::Vector< std::unique_ptr< amrex::MultiFab > > | m_y_pos |
| amrex::Vector< std::unique_ptr< amrex::MultiFab > > | m_z_pos |
| amrex::Vector< std::unique_ptr< amrex::iMultiFab > > | m_i_indx |
| amrex::Vector< std::unique_ptr< amrex::iMultiFab > > | m_j_indx |
| amrex::Vector< std::unique_ptr< amrex::iMultiFab > > | m_k_indx |
| amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > | m_averages |
| amrex::Vector< PlanarBoundary > | m_planar_bndry |
| amrex::Vector< amrex::Vector< std::unique_ptr< amrex::MultiFab > > > | m_rot_fields |
| amrex::Vector< amrex::Vector< int > > | m_ncell_plane |
| amrex::Vector< amrex::Vector< amrex::Real > > | m_plane_average |
| int | m_radius {0} |
| int | m_ncell_region {1} |
| amrex::Vector< int > | m_k_in |
| bool | m_interp {false} |
| bool | m_norm_vec {false} |
| amrex::Vector< const eb_ * > | m_eb_vec |
| amrex::Vector< amrex::Vector< amrex::Real > > | m_total_bndry_area |
| bool | m_t_avg {false} |
| amrex::Vector< int > | m_t_init |
| double | m_time_window {1.0e-16} |
| amrex::Real | m_fact_new |
| amrex::Real | m_fact_old |
| bool | include_subgrid_vel = false |
| amrex::Vector< amrex::Real > | m_Vsg |
| const amrex::Real | zref_sentinel = amrex::Real(-1.0) |
|
explicit |
Construct the MOST averaging helper.
| [in] | face | orientation of face for MOST averaging |
| [in] | geom | geometry for all AMR levels |
| [in] | has_zphys | whether nodal physical-height data are available |
| [in] | a_pp_prefix | ParmParse prefix |
| [in] | m_mesh_type | mesh type |
| [in] | m_terrain_type | terrain representation |
| [in] | zlevels_stag | nominal staggered z levels for all AMR levels |
| [in] | eb_vec | optional embedded-boundary geometry data |
|
defaultnoexcept |
Default move constructor.
|
delete |
Deleted copy constructor.
| [in] | other | source object |
|
inlinestatic |
Height of a cell center above the bottom of the domain, on a column of staggered (face) heights.
| [in] | zlevels | staggered heights of the column (nz+1 faces) |
| [in] | k | cell index |
Referenced by k_index_below(), and set_k_indices_N().

|
inlinestatic |
Height of the top of the column above its bottom, on a column of staggered (face) heights; the high z face's distances are measured from it.
| [in] | zlevels | staggered heights of the column (nz+1 faces) |
Referenced by set_k_indices_N().

| void MOSTAverage::compute_averages | ( | const int & | lev | ) |
Driver for the selected average policy.
| [in] | lev | level index |
Function to call the type of average computation.
| [in] | lev | Current level |

| void MOSTAverage::compute_eb_averages | ( | const int & | lev | ) |
Fill averages for the embedded-boundary policy.
| [in] | lev | level index |
Function to compute average over an EB surface.
| [in] | lev | Current level |
Referenced by compute_averages().


| void MOSTAverage::compute_plane_averages | ( | const int & | lev | ) |
Fill averages for the plane policy.
| [in] | lev | level index |
Function to compute average over a plane.
| [in] | lev | Current level |
Referenced by compute_averages().


| void MOSTAverage::compute_region_averages | ( | const int & | lev | ) |
Fill averages for the point or region policy.
| [in] | lev | level index |
Function to compute average over local region.
| [in] | lev | Current level |
Referenced by compute_averages().


|
inline |
Return whether the averages are filtered in time (erf.most.time_average).
Referenced by SurfaceLayer::mac_avg_is_time_averaged().

| void MOSTAverage::extrap_ghost_cells | ( | const int & | lev, |
| const int & | iavg, | ||
| const amrex::IntVect & | ng_fill | ||
| ) |
Fill the ghost cells of one average that cannot be computed from the field data with a zeroth-order extrapolation of the nearest computed value.
The averages hold as many ghost cells as the fields, which is more than can be computed from them (see get_ng_fill), so the outermost layers are filled here to leave no average undefined. This is done before the FillBoundary, which then overwrites whatever is shared with a neighbor.
| [in] | lev | level index |
| [in] | iavg | average component index |
| [in] | ng_fill | number of ghost cells that hold computed data |
Function to fill the ghost cells of one average that cannot be computed from the field data with a zeroth-order extrapolation of the nearest computed value.
The averages hold as many ghost cells as the fields, which is more than can be computed from them (see get_ng_fill), so the outermost layers are filled here to leave no average undefined. This is done before the FillBoundary, which then overwrites whatever is shared with a neighboring box.
| [in] | lev | Current level |
| [in] | iavg | Average component |
| [in] | ng_fill | Number of ghost cells holding computed data |
Referenced by compute_region_averages().


| void MOSTAverage::fill_planar_boundary | ( | const int & | lev, |
| amrex::MultiFab & | mf | ||
| ) |
Fill the ghost cells of one planar average, and the valid region of its uncomputed copies when the 3D BoxArray is split in z (see PlanarBoundary).
| [in] | lev | level index |
| [in,out] | mf | planar average to fill |
Function to fill the ghost cells of one planar average.
The averages hold one box per 3D box, so a 3D BoxArray split in the face-normal direction gives duplicate planar boxes, of which only the surface copy is computed by compute_region_averages; a FillBoundary could then fill a ghost cell from an uncomputed copy (see PlanarBoundary). With the split, the valid region of the uncomputed copies is filled as well. With EB terrain the averages are computed on every box and FillBoundary is well defined.
| [in] | lev | Current level |
| [in,out] | mf | Planar average to fill |
Referenced by compute_region_averages(), and fill_zref_planar().

| void MOSTAverage::fill_zref_planar | ( | const int & | lev | ) |
Copy the reference heights of the wall-owning planar boxes onto every planar box of the level and check that no column is left at the sentinel.
| [in] | lev | Current level |
Copy the reference heights of the wall-owning planar boxes onto every planar box.
| [in] | lev | Current level |
The lookups fill only the planar boxes whose 3D box touches the wall. When the level is split in the wall-normal direction the planar BoxArray holds duplicates of those boxes, which would otherwise keep the sentinel: a plain FillBoundary may copy it into a ghost cell, and min() would report it. No column may be left at the sentinel afterwards.
Referenced by set_k_indices_T(), set_norm_indices_T(), set_norm_positions_T(), and set_z_positions_T().


|
inlinestatic |
Find the vertical position, in cell units, of a point for trilinear_interp_T: floor(zval) is the upper of the two cells whose centers bracket the point, and the interpolation reads that cell and the one below it.
| [in] | xp | X-position |
| [in] | yp | Y-position |
| [in] | zp | Z-position |
| [in] | z_arr | Physical heights |
| [in] | plo | Problem lower bounds |
| [in] | dxi | Inverse cell size array |
| [out] | ireal | x-position in cell units |
| [out] | jreal | y-position in cell units |
| [out] | zval | z-position in cell units |
Referenced by max_k_read(), and trilinear_interp_T().


|
inline |
Return one 2D average MultiFab for modification (used to restore the exponential filter state from a checkpoint).
| [in] | lev | level index |
| [in] | comp | average component index |
|
inline |
Return one 2D average MultiFab.
| [in] | lev | level index |
| [in] | comp | average component index |
Referenced by SurfaceLayer::get_mac_avg(), and SurfaceLayer::get_mac_avg_ptr().

|
inline |
Return the field the averages read.
| [in] | lev | level index |
| [in] | comp | 0 x-velocity, 1 y-velocity, 2 z-velocity, 3 theta, 4 qv, 5 qr |
|
inline |
|
inline |
Return the number of average components.
Referenced by SurfaceLayer::get_num_mac_avg().

| IntVect MOSTAverage::get_ng_fill | ( | const int & | lev | ) | const |
Return the number of ghost cells of the 2D data (averages, indices and positions) that can be filled from the field data at this level.
With more than one level we must explicitly fill the ghost cells of the 2D data: an isolated fine patch has no neighboring box for a FillBoundary to communicate with, while the fields themselves do carry valid ghost data (filled from the coarse level). The 2D data are allocated with as many ghost cells as the fields they are built from, but an average reads the fields over m_radius cells in each direction and the tangential velocity magnitude (like the interpolation stencil) reaches one cell beyond that. So a ghost cell of the 2D data can only be computed where the fields carry m_radius+1 ghost cells past it.
| [in] | lev | level index |
Function to return the number of ghost cells of the 2D data (averages, indices and positions) that can be filled from the field data.
With more than one level we must explicitly fill the ghost cells of the 2D data: an isolated fine patch has no neighboring box for a FillBoundary to communicate with, while the fields themselves do carry valid ghost data (filled from the coarse level). The 2D data are allocated with as many ghost cells as the fields they are built from, but an average reads the fields over m_radius cells in each direction and the tangential velocity magnitude (like the interpolation stencil) reaches one cell beyond that. So a ghost cell of the 2D data can only be computed where the fields carry m_radius+1 ghost cells past it.
| [in] | lev | Current level |
Referenced by compute_region_averages(), interp_stencil_bounds(), max_k_read(), set_k_indices_T(), set_norm_indices_T(), set_norm_positions_T(), and set_z_positions_T().

|
inline |
Return the filtered plane averages, which hold the filter state for the plane and EB policies. The region policy holds its state in m_averages instead and never allocates these, in which case this is empty.
| [in] | lev | level index |
Referenced by SurfaceLayer::get_mac_plane_avg().

|
inline |
Return z_ref, which may be computed from a specified k-index.
| [in] | lev | level index |
Referenced by SurfaceLayer::get_zref(), SurfaceLayer::get_zref_min(), and SurfaceLayer::make_SurfaceLayer_at_level().

|
inlinestatic |
Whether a height lies in the vertical extent [z_lo, z_hi) of a cell.
The interval is closed below so that a query height landing exactly on a face (e.g. the default 10 m on a flat mesh with a 10 m first cell) belongs to the cell above it rather than to neither cell.
| [in] | z | query height |
| [in] | z_lo | height of the lower face |
| [in] | z_hi | height of the upper face |
Referenced by find_interp_height_T(), and set_norm_indices_T().

| MOSTAverage::InterpStencilBounds MOSTAverage::interp_stencil_bounds | ( | const int & | lev, |
| const amrex::MFIter & | mfi | ||
| ) | const |
Return the lateral bounds on the interpolation stencil in the box of mfi.
| [in] | lev | level index |
| [in] | mfi | iterator over the cell-centered fields |
Function to return the lateral bounds on the interpolation stencil in one box.
| [in] | lev | Current level |
| [in] | mfi | Iterator over the cell-centered fields |
Referenced by set_norm_positions_T().


|
inlinestatic |
Index of the highest cell whose center lies at or below a height above the bottom of the domain, on a column of staggered (face) heights. This is the stretched-mesh counterpart of floor(zref/dz - 1/2) on a uniform mesh.
| [in] | zlevels | staggered heights of the column (nz+1 faces) |
| [in] | zref | height above zlevels[0] |
Referenced by set_k_indices_N().


| void MOSTAverage::make_MOSTAverage_at_level | ( | const int & | lev, |
| const amrex::Vector< amrex::MultiFab * > & | vars_old, | ||
| std::unique_ptr< amrex::MultiFab > & | Theta_prim, | ||
| std::unique_ptr< amrex::MultiFab > & | Qv_prim, | ||
| std::unique_ptr< amrex::MultiFab > & | Qr_prim, | ||
| std::unique_ptr< amrex::MultiFab > & | z_phys_nd, | ||
| const amrex::Vector< std::unique_ptr< amrex::MultiFab >> * | mapfac = nullptr |
||
| ) |
Make MOST-average data structures at one level.
| [in] | lev | level index |
| [in] | vars_old | old-time state and velocity fields |
| [in] | Theta_prim | primitive potential-temperature field |
| [in] | Qv_prim | primitive water-vapor field |
| [in] | Qr_prim | primitive rain-water field |
| [in] | z_phys_nd | nodal physical-height field |
| [in] | mapfac | map-factor fields at the level (MapFacType); none means m = 1 |
Make MOSTAverage data structures at one level.
| [in] | lev | Current level |
| [in] | vars_old | State data used by the average calculator |
| [in] | Theta_prim | Primitive theta component at this level |
| [in] | Qv_prim | Primitive water-vapor component at this level |
| [in] | Qr_prim | Primitive rain-water component at this level |
| [in] | z_phys_nd | Nodal physical height at this level |
Referenced by SurfaceLayer::make_SurfaceLayer_at_level().


| int MOSTAverage::max_k_read | ( | const int & | lev | ) | const |
Return the highest k at which the averages on the z-low face read the horizontal velocities on this level: the reference index plus the radius, or with interpolation the upper of the two cells around each sample point. The bound is global over the level.
| [in] | lev | level index |
Function to return the highest k at which the averages on the z-low face read the horizontal velocities.
It follows the reads of compute_plane_averages and compute_region_averages: the columns of every box at the surface, over the faces of the U & V averages and the ghost cells the averages fill (get_ng_fill). Without interpolation a column reads its reference index plus the radius; with it, the upper of the two cells around each sample point of its region, the highest of which is m_radius cells along the normal. Without terrain the reference index is the same in every column.
| [in] | lev | Current level |

|
inline |
Return whether max_k_read can change after the level is made: the interpolation searches the current heights, which move with a moving mesh.
|
delete |
Deleted copy-assignment operator.
| [in] | other | source object |
|
deletenoexcept |
Deleted move-assignment operator.
| [in] | other | source object |
| void MOSTAverage::set_eb_normalization | ( | const int & | lev | ) |
Compute total embedded-boundary surface area.
| [in] | lev | level index |
Function to compute normalization for average over EB.
| [in] | lev | Current level |
Referenced by make_MOSTAverage_at_level().


| void MOSTAverage::set_k_indices_N | ( | const int & | lev | ) |
Populate the 2D k-index iMultiFab without terrain.
| [in] | lev | level index |
Function to set K indices without terrain.
| [in] | lev | Current level |
Referenced by make_MOSTAverage_at_level(), and set_k_indices_T().


| void MOSTAverage::set_k_indices_T | ( | const int & | lev | ) |
Populate the 2D k-index iMultiFab with terrain.
| [in] | lev | level index |
Function to set K indices with terrain (w/o terrain normals or interpolation).
| [in] | lev | Current level |
Referenced by make_MOSTAverage_at_level().


| void MOSTAverage::set_norm_indices_T | ( | const int & | lev | ) |
Populate all 2D normal-index iMultiFabs with terrain.
| [in] | lev | level index |
Function to set I,J,K indices with terrain normals (w/o interpolation).
| [in] | lev | Current level |
Referenced by make_MOSTAverage_at_level().


| void MOSTAverage::set_norm_positions_T | ( | const int & | lev | ) |
Populate terrain-aware normal positions.
| [in] | lev | level index |
Function to set positions with terrain and normal vector (with interpolation).
| [in] | lev | Current level |
Referenced by make_MOSTAverage_at_level().


|
inline |
Restore the filtered plane averages from a checkpoint. Returns false if the checkpoint does not hold what this run expects, e.g. because the averaging policy changed, in which case nothing is restored.
| [in] | lev | level index |
| [in] | pavg | filtered plane averages, one per average component |
Referenced by SurfaceLayer::set_mac_plane_avg().

| void MOSTAverage::set_plane_normalization | ( | const int & | lev | ) |
Compute number of cells per averaging plane.
| [in] | lev | level index |
Function to compute normalization for plane average.
| [in] | lev | Current level |
Referenced by make_MOSTAverage_at_level().

|
inline |
Compute number of cells in the region average.
| [in] | lev | level index |
Referenced by make_MOSTAverage_at_level().

| void MOSTAverage::set_rotated_fields | ( | const int & | lev | ) |
Update the rotated fields.
| [in] | lev | level index |
Function to set the rotated velocities.
| [in] | lev | Current level |
Referenced by compute_averages().


|
inline |
Declare the time filter at this level to hold meaningful history. This is used on restart, once the filter state has been read back in.
| [in] | lev | level index |
Referenced by SurfaceLayer::set_mac_avg_initialized().

|
inline |
Average these horizontal velocities instead of the level's own, until the next update_field_ptrs or make_MOSTAverage_at_level, which point the averages back at the level's own. They must have the level's boxes, ghost cells included, cut at the top no lower than max_k_read: each box keeps its lower end, and a box wholly above max_k_read may keep a single plane, which is never read.
| [in] | lev | level index |
| [in] | xvel | x-velocity to average |
| [in] | yvel | y-velocity to average |
Referenced by SurfaceLayer::update_mac_ptrs().

| void MOSTAverage::set_z_positions_EB | ( | const int & | lev | ) |
Populate embedded-boundary z positions.
| [in] | lev | level index |
Function to set K indices for EB.
| [in] | lev | Current level |
Referenced by make_MOSTAverage_at_level().


| void MOSTAverage::set_z_positions_T | ( | const int & | lev | ) |
Populate terrain-aware z positions.
| [in] | lev | level index |
Function to set positions with terrain and e_z vector (with interpolation but no terrain normals)
| [in] | lev | Current level |
Referenced by make_MOSTAverage_at_level().


|
inline |
Return whether the time filter at this level holds meaningful history. Until it does, the next average is taken to be the instantaneous one.
| [in] | lev | level index |
Referenced by SurfaceLayer::mac_avg_is_initialized().

|
inlinestatic |
Function to compute trilinear interpolation with terrain.
| [in] | xp | X-position |
| [in] | yp | Y-position |
| [in] | zp | Z-position |
| [out] | interp_vals | Values interpolated |
| [in] | interp_array | Array to interpolate on |
| [in] | z_arr | Physical heights |
| [in] | plo | Problem lower bounds |
| [in] | dxi | Inverse cell size array |
| [in] | interp_comp | Number of components to interpolate |
Referenced by compute_plane_averages(), and compute_region_averages().


| void MOSTAverage::update_field_ptrs | ( | const int & | lev, |
| amrex::Vector< amrex::Vector< amrex::MultiFab >> & | vars_old, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Theta_prim, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Qv_prim, | ||
| amrex::Vector< std::unique_ptr< amrex::MultiFab >> & | Qr_prim | ||
| ) |
Reset pointers to field MultiFabs.
| [in] | lev | level index |
| [in] | vars_old | old-time state and velocity fields |
| [in] | Theta_prim | primitive potential-temperature fields by level |
| [in] | Qv_prim | primitive water-vapor fields by level |
| [in] | Qr_prim | primitive rain-water fields by level |
Function to reset the pointers to field variables.
| [in] | lev | Current level |
| [in] | vars_old | Conserved variables at each level |
| [in] | Theta_prim | Primitive theta component at each level |
| [in] | Qv_prim | Primitive water-vapor component at each level |
| [in] | Qr_prim | Primitive rain-water component at each level |
Referenced by SurfaceLayer::update_mac_ptrs().

| void MOSTAverage::validate_lateral_reference_stencil | ( | const int & | lev | ) |
Verify that the lateral face-owned FAB contains the reference stencil.
| [in] | lev | level index |
This is a conservative preflight check for the direct regional-average path. It verifies that the reference point plus averaging radius, with allowance for staggered-field neighbors, is available in the owned FAB.
Verify that lateral face-owned FABs contain the direct regional stencil.
| [in] | lev | Current level. |
The check uses the full cell-centered source field as a conservative layout proxy for the staggered fields used by the regional kernels. It includes ghost cells and one extra cell on each high side for staggered neighbors.
TODO: Remove this check if a distributed reference-plane staging implementation is added to the direct lateral regional path.
Referenced by make_MOSTAverage_at_level().


| void MOSTAverage::write_averages | ( | const int & | lev | ) |
Write averages on the 2D MultiFab.
| [in] | lev | level index |
Function to write averages to text file.
| [in] | lev | Current level |

| void MOSTAverage::write_k_indices | ( | const int & | lev | ) |
Write k-index data.
| [in] | lev | level index |
Function to write the K indices to text file.
| [in] | lev | Current level |

| void MOSTAverage::write_norm_indices | ( | const int & | lev | ) |
Write normal-index data.
| [in] | lev | level index |
Function to write I,J,K indices to text file.
| [in] | lev | Current level |

| void MOSTAverage::write_xz_positions | ( | const int & | lev, |
| const int & | j | ||
| ) |
Write XZ planar positions.
| [in] | lev | level index |
| [in] | j | y-index of the plane to write |
Function to write X & Z positions to text file.
| [in] | lev | Current level |
| [in] | j | Index in y-dir |

|
protected |
Referenced by make_MOSTAverage_at_level().
|
protected |
|
protected |
Referenced by compute_eb_averages(), and set_eb_normalization().
|
protected |
Referenced by compute_eb_averages(), compute_plane_averages(), compute_region_averages(), extrap_ghost_cells(), fill_planar_boundary(), get_ng_fill(), make_MOSTAverage_at_level(), max_k_read(), set_k_indices_N(), set_k_indices_T(), set_norm_indices_T(), set_norm_positions_T(), set_plane_normalization(), set_z_positions_T(), validate_lateral_reference_stencil(), write_averages(), write_k_indices(), and write_norm_indices().
|
protected |
Referenced by compute_eb_averages(), compute_plane_averages(), compute_region_averages(), and make_MOSTAverage_at_level().
|
protected |
Referenced by compute_eb_averages(), compute_plane_averages(), compute_region_averages(), and make_MOSTAverage_at_level().
|
protected |
Referenced by compute_eb_averages(), compute_plane_averages(), compute_region_averages(), get_field_ptr(), get_ng_fill(), interp_stencil_bounds(), make_MOSTAverage_at_level(), max_k_read(), set_k_indices_T(), set_norm_indices_T(), set_norm_positions_T(), set_plane_normalization(), set_rotated_fields(), set_velocity_field_ptrs(), set_z_positions_T(), update_field_ptrs(), validate_lateral_reference_stencil(), write_averages(), write_k_indices(), write_norm_indices(), and write_xz_positions().
|
protected |
Referenced by compute_eb_averages(), compute_plane_averages(), compute_region_averages(), fill_planar_boundary(), make_MOSTAverage_at_level(), max_k_read(), set_eb_normalization(), set_k_indices_N(), set_k_indices_T(), set_norm_indices_T(), set_norm_positions_T(), set_plane_normalization(), set_rotated_fields(), set_z_positions_EB(), set_z_positions_T(), validate_lateral_reference_stencil(), write_averages(), write_k_indices(), write_norm_indices(), and write_xz_positions().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by set_k_indices_N(), and set_k_indices_T().
|
protected |
|
protected |
Referenced by make_MOSTAverage_at_level(), set_norm_indices_T(), set_norm_positions_T(), and set_rotated_fields().
|
protected |
Referenced by make_MOSTAverage_at_level(), set_eb_normalization(), and set_plane_normalization().
|
protected |
Referenced by set_k_indices_N().
|
protected |
|
protected |
Referenced by compute_plane_averages(), and set_plane_normalization().
|
protected |
Referenced by compute_region_averages(), and set_region_normalization().
|
protected |
|
protected |
Referenced by get_ng_fill(), and make_MOSTAverage_at_level().
|
protected |
Referenced by fill_planar_boundary(), and make_MOSTAverage_at_level().
|
protected |
|
protected |
Referenced by compute_averages(), make_MOSTAverage_at_level(), and max_k_read().
|
protected |
Referenced by set_k_indices_N(), set_k_indices_T(), set_norm_indices_T(), set_norm_positions_T(), set_z_positions_EB(), and set_z_positions_T().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by make_MOSTAverage_at_level().
|
protected |
Referenced by compute_eb_averages(), and set_eb_normalization().
|
protected |
Referenced by compute_eb_averages(), compute_plane_averages(), compute_region_averages(), and make_MOSTAverage_at_level().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by set_k_indices_N().
|
protected |
|
protected |