113 SampledBracket bracket;
118 auto coordinate_value = [=] AMREX_GPU_DEVICE (
int kk) noexcept -> Real {
119 if (coordinate == SampledCoordinate::ModelIndex) {
120 return static_cast<Real
>(kk);
123 const auto field_id = (coordinate == SampledCoordinate::HeightMSL)
124 ? SampledFieldID::HeightMSL
125 : (coordinate == SampledCoordinate::HeightAGL)
126 ? SampledFieldID::HeightAGL
127 : SampledFieldID::Pressure;
128 return sampled_field_value(field_id, cons_arr, z_phys_cc_arr, z_phys_nd_arr, z_sfc_nd_arr, p_hse_arr,
129 have_z_phys_cc, use_hse_pressure, i, j, kk, moisture_indices);
132 const Real c0 = coordinate_value(
klo);
136 bracket.found =
true;
141 for (
int k =
klo; k <
khi; ++k) {
142 const Real
hi = coordinate_value(k + 1);
146 bracket.found =
true;
const int khi
Definition: ERF_InitCustomPert_Bubble.H:25
const int klo
Definition: ERF_InitCustomPert_KE.H:9
AMREX_GPU_DEVICE AMREX_FORCE_INLINE amrex::Real sampled_field_value(SampledFieldID field_id, const amrex::Array4< const amrex::Real > &cons_arr, const amrex::Array4< const amrex::Real > &z_phys_cc_arr, const amrex::Array4< const amrex::Real > &z_phys_nd_arr, const amrex::Array4< const amrex::Real > &z_sfc_nd_arr, const amrex::Array4< const amrex::Real > &p_hse_arr, bool have_z_phys_cc, bool use_hse_pressure, int i, int j, int k, const MoistureComponentIndices &moisture_indices) noexcept
Definition: ERF_Plotfile2DSampledField.H:96
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE bool sampled_target_is_bracketed(amrex::Real target, amrex::Real c0, amrex::Real c1) noexcept
Definition: ERF_Plotfile2DInterpolator.H:37