ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
TerrainIF Class Reference

#include <ERF_TerrainIF.H>

Inheritance diagram for TerrainIF:
Collaboration diagram for TerrainIF:

Public Member Functions

 TerrainIF (amrex::FArrayBox &a_z_terrain, amrex::Geometry &a_geom)
 
AMREX_GPU_HOST_DEVICE amrex::Real operator() (AMREX_D_DECL(amrex::Real x, amrex::Real y, amrex::Real z)) const noexcept
 
amrex::Real operator() (const amrex::RealArray &p) const noexcept
 

Protected Attributes

amrex::FArrayBox & m_terr
 
amrex::Geometry & m_geom
 

Constructor & Destructor Documentation

◆ TerrainIF()

TerrainIF::TerrainIF ( amrex::FArrayBox &  a_z_terrain,
amrex::Geometry &  a_geom 
)
inline
18  : m_terr(a_z_terrain),
19  m_geom(a_geom)
20  {
21  amrex::Print() << " EB type = Terrain " << std::endl;
22  }
amrex::FArrayBox & m_terr
Definition: ERF_TerrainIF.H:45
amrex::Geometry & m_geom
Definition: ERF_TerrainIF.H:46

Member Function Documentation

◆ operator()() [1/2]

AMREX_GPU_HOST_DEVICE amrex::Real TerrainIF::operator() ( AMREX_D_DECL(amrex::Real x, amrex::Real y, amrex::Real z ) const
inlinenoexcept
27  {
28  amrex::Real dx = m_geom.CellSizeArray()[0];
29  amrex::Real dy = m_geom.CellSizeArray()[1];
30 
31  const int i = static_cast<int>(x / dx);
32  const int j = static_cast<int>(y / dy);
33 
34  amrex::Array4<amrex::Real const> const& terr_arr = m_terr.const_array();
35 
36  return -(z - terr_arr(i,j,0));
37  }

Referenced by operator()().

Here is the caller graph for this function:

◆ operator()() [2/2]

amrex::Real TerrainIF::operator() ( const amrex::RealArray &  p) const
inlinenoexcept
40  {
41  return this->operator() (AMREX_D_DECL(p[0], p[1], p[2]));
42  }
AMREX_GPU_HOST_DEVICE amrex::Real operator()(AMREX_D_DECL(amrex::Real x, amrex::Real y, amrex::Real z)) const noexcept
Definition: ERF_TerrainIF.H:25
Here is the call graph for this function:

Member Data Documentation

◆ m_geom

amrex::Geometry& TerrainIF::m_geom
protected

Referenced by operator()().

◆ m_terr

amrex::FArrayBox& TerrainIF::m_terr
protected

Referenced by operator()().


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