ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_InterpolationUtils.H File Reference

Utility functions for field interpolation at particle positions. More...

#include <AMReX_FArrayBox.H>
#include <AMReX_GpuContainers.H>
#include <AMReX_REAL.H>
#include <AMReX_Array4.H>
#include "ERF_Constants.H"
#include "ERF_TerrainConversion.H"
Include dependency graph for ERF_InterpolationUtils.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ERF
 
 ERF::Interpolation
 

Functions

template<typename ParticleType >
AMREX_GPU_DEVICE AMREX_FORCE_INLINE void ERF::Interpolation::interpolateFields (const ParticleType &p, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &plo, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxi, const amrex::Array4< const amrex::Real > *field_arrays, amrex::ParticleReal *result_values, int num_fields)
 Interpolate multiple field values at a particle position using CIC. More...
 
template<typename ParticleType , typename Array4Type >
AMREX_GPU_DEVICE AMREX_FORCE_INLINE bool ERF::Interpolation::stencilOutOfBoundsZ (const ParticleType &p, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &plo, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > &dxi, const Array4Type &zheight) noexcept
 Test whether a particle's vertical CIC stencil reads past the local fab. cic_interpolate reads cell-centered data at k0+1 and k0+2 with k0 in {pk-1, pk}, so the maximum read offset is pk+2. Returns true if the stencil is out of bounds and the caller should skip the particle. More...
 

Detailed Description

Utility functions for field interpolation at particle positions.