|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <limits>#include <memory>#include <AMReX_MultiFab.H>#include <AMReX_ParallelDescriptor.H>#include <AMReX_Reduce.H>

Go to the source code of this file.
Functions | |
| AMREX_FORCE_INLINE void | reduce_to_max_per_height (amrex::Vector< amrex::Real > &v, std::unique_ptr< amrex::MultiFab > &mf, const amrex::Vector< amrex::Real > &zlevels_stag) |
| AMREX_FORCE_INLINE void reduce_to_max_per_height | ( | amrex::Vector< amrex::Real > & | v, |
| std::unique_ptr< amrex::MultiFab > & | mf, | ||
| const amrex::Vector< amrex::Real > & | zlevels_stag | ||
| ) |
Reduce a multifab of heights to a vector of max values at each height: v[k] is the largest valid value of mf at index k over all boxes of the level. A box contributes only the k it holds, since the boxes of a level need not span the column (a refined region that does not reach the top or the ground, or grids split in z). A k that no box holds gets the nominal height of the level from zlevels_stag (the face height if mf is nodal in z, the mean of the two faces otherwise), so every entry of v is a height and no caller has to test for a k that is not covered.
| [out] | v | max of mf per k |
| [in] | mf | heights (z_phys_cc or z_phys_nd of a level) |
| [in] | zlevels_stag | nominal heights of the z faces of the level |
Referenced by ERF::setSpongeRefFromSounding().

