ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
PBLDerivativeDzInv_S Struct Reference

#include <ERF_PBLModels.H>

Collaboration diagram for PBLDerivativeDzInv_S:

Public Member Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE PBLDerivativeDzInv operator() (int, int, int k) const noexcept
 

Public Attributes

const amrex::Realdz
 
int klo
 
int khi
 

Member Function Documentation

◆ operator()()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE PBLDerivativeDzInv PBLDerivativeDzInv_S::operator() ( int  ,
int  ,
int  k 
) const
inlinenoexcept
405  {
406  // Adjacent cell centers are separated by half the sum of their widths.
407  const amrex::Real dz_lo = dz[(k > klo) ? k-1 : k];
408  const amrex::Real dz_hi = dz[(k < khi) ? k+1 : k];
409  return {two / (dz_lo + two*dz[k] + dz_hi),
410  two / dz[k],
411  two / dz[k]};
412  }
constexpr amrex::Real two
Definition: ERF_Constants.H:10
amrex::Real Real
Definition: ERF_ShocInterface.H:19
const amrex::Real * dz
Definition: ERF_PBLModels.H:399
int klo
Definition: ERF_PBLModels.H:400
int khi
Definition: ERF_PBLModels.H:401

Member Data Documentation

◆ dz

const amrex::Real* PBLDerivativeDzInv_S::dz

Referenced by operator()().

◆ khi

int PBLDerivativeDzInv_S::khi

Referenced by operator()().

◆ klo

int PBLDerivativeDzInv_S::klo

Referenced by operator()().


The documentation for this struct was generated from the following file: