|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <AMReX_FillPatchUtil.H>#include <AMReX_Interpolater.H>#include <AMReX_MFInterp_C.H>#include <AMReX_MultiFab.H>#include <limits>

Go to the source code of this file.
Classes | |
| class | TypedConsLinear |
Functions | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | typed_mcslope (int i, int j, int k, amrex::Array4< amrex::Real > const &slope, int ns, int nslope, amrex::Array4< amrex::Real const > const &u, int nu, int nm, amrex::Box const &domain, amrex::IntVect const &ratio, amrex::BCRec const &bc) noexcept |
| void | interp_by_type_packed (amrex::MultiFab &fdst, amrex::MultiFab &csrc, int nind, const amrex::Geometry &cgeom, const amrex::Geometry &fgeom, const amrex::IntVect &ratio, const amrex::BCRec &bc) |
| void | interp_by_type (amrex::MultiFab &dst, const amrex::MultiFab &src, const amrex::MultiFab &indicator, const amrex::Geometry &cgeom, const amrex::Geometry &fgeom, const amrex::IntVect &ratio, const amrex::Vector< amrex::BCRec > &bcs, int bcscomp) |
|
inline |
Interpolate the coarse fields src into the fine fields dst (same number of components) with TypedConsLinear. The type of each coarse cell is given by indicator, one value per type, on any BoxArray (it is copied onto src's cells, ghost cells included): with one component it applies to every field, with src.nComp() components component n applies to field n. Coarse cells it does not reach, and cells outside the domain, have no type and are never anyone's neighbor. Fine cells the interpolation does not fill (ghost cells outside the domain) keep their values in dst. Every field takes the boundary condition bcs[bcscomp].

|
inline |
TypedConsLinear on data already packed for it. Components 0 to nfield-1 of csrc are the coarse fields and the nind (1 or nfield) after them their type indicators, one value per type; ghost cells included, since the interpolation reads them. The indicators are set to NaN (no type) outside the domain here. fdst has the same layout: its fields are interpolated, and keep their values in the cells the interpolation does not fill (ghost cells outside the domain); its indicator components are scratch. Every field takes the boundary condition bc.
Packing many fields moves them in one ParallelCopy rather than one apiece; a caller that packs them anyway saves interp_by_type's copies by building csrc and fdst directly.
Referenced by interp_by_type(), NOAHMP::interp_from_lev0(), SurfaceModel::interp_surface_fields_from_coarse(), and SLM::Lsm_Interpolate_From_Source().


|
noexcept |
Slopes of the field (component nu) of coarse cell (i,j,k), from neighbors of its own type only (indicator in component nm). Follows mf_cell_cons_lin_interp_mcslope term for term; the slope in direction d goes to component ns + d*nslope, the layout mf_cell_cons_lin_interp reads.
Referenced by TypedConsLinear::interp().
