ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_ReadBndryPlanes.cpp File Reference
#include "AMReX_Gpu.H"
#include "AMReX_ParmParse.H"
#include <AMReX_PlotFileUtil.H>
#include "ERF_ReadBndryPlanes.H"
#include "ERF_IndexDefines.H"
#include "AMReX_MultiFabUtil.H"
#include "ERF_EOS.H"
Include dependency graph for ERF_ReadBndryPlanes.cpp:

Functions

AMREX_FORCE_INLINE int closest_index (const Vector< Real > &vec, const Real value)
 
AMREX_FORCE_INLINE IntVect offset (const int face_dir, const int normal)
 

Function Documentation

◆ closest_index()

AMREX_FORCE_INLINE int closest_index ( const Vector< Real > &  vec,
const Real  value 
)

Return closest index (from lower) of value in vector

16 {
17  auto const it = std::upper_bound(vec.begin(), vec.end(), value);
18  AMREX_ALWAYS_ASSERT(it != vec.end());
19 
20  const int idx = std::distance(vec.begin(), it);
21  return std::max(idx - 1, 0);
22 }

Referenced by ReadBndryPlanes::read_input_files().

Here is the caller graph for this function:

◆ offset()

AMREX_FORCE_INLINE IntVect offset ( const int  face_dir,
const int  normal 
)

Return offset vector

29 {
30  IntVect offset(IntVect::TheDimensionVector(normal));
31  if (face_dir == 1) {
32  for (auto& o : offset) {
33  o *= -1;
34  }
35  }
36  return offset;
37 }
AMREX_FORCE_INLINE IntVect offset(const int face_dir, const int normal)
Definition: ERF_ReadBndryPlanes.cpp:28

Referenced by PlaneAverage::compute_averages(), ComputeTurbulentViscosityLES(), Radiation::expand_yakl1d_to_mf(), Radiation::export_surface_fluxes(), Radiation::initialize(), make_mom_sources(), make_sources(), ERF::project_velocities_tb(), ReadBndryPlanes::read_file(), realbdy_compute_interior_ghost_rhs(), Radiation::run(), LineSampler::write_line_mfs(), Radiation::yakl_to_mf(), and zenith().

Here is the caller graph for this function: