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

#include <ERF_InflowProfile.H>

Collaboration diagram for InflowProfile:

Public Member Functions

void copy_to_device ()
 

Public Attributes

bool active = false
 
bool has_theta = false
 
bool has_tke = false
 
std::string source
 "log_law" or the profile file name More...
 
amrex::Vector< amrex::Real > z
 Host tables against height above the ground (strictly increasing) More...
 
amrex::Vector< amrex::Real > u
 
amrex::Vector< amrex::Real > v
 
amrex::Vector< amrex::Real > theta
 
amrex::Vector< amrex::Real > tke
 
amrex::Gpu::DeviceVector< amrex::Real > z_d
 Device copies used by the boundary fills. More...
 
amrex::Gpu::DeviceVector< amrex::Real > u_d
 
amrex::Gpu::DeviceVector< amrex::Real > v_d
 
amrex::Gpu::DeviceVector< amrex::Real > theta_d
 
amrex::Gpu::DeviceVector< amrex::Real > tke_d
 

Detailed Description

Terrain-following inflow profiles for Inflow and InflowOutflow faces (xlo.inflow_profile = "log_law" or "file").

A profile tabulates u, v and, when given, theta and tke against height above the local ground. Each boundary cell looks the profile up at its own height above the terrain beneath it, so the inflow follows the terrain along a sloping face, as WindNinja's inlets do. The terrain on the boundary is left as it is.

Member Function Documentation

◆ copy_to_device()

void InflowProfile::copy_to_device ( )
19 {
20  auto copy = [] (const Vector<Real>& h, Gpu::DeviceVector<Real>& d) {
21  d.resize(h.size());
22  Gpu::copy(Gpu::hostToDevice, h.begin(), h.end(), d.begin());
23  };
24  copy(z, z_d);
25  copy(u, u_d);
26  copy(v, v_d);
27  copy(theta, theta_d);
28  copy(tke, tke_d);
29 }
amrex::Vector< amrex::Real > tke
Definition: ERF_InflowProfile.H:32
amrex::Vector< amrex::Real > theta
Definition: ERF_InflowProfile.H:32
amrex::Gpu::DeviceVector< amrex::Real > z_d
Device copies used by the boundary fills.
Definition: ERF_InflowProfile.H:35
amrex::Gpu::DeviceVector< amrex::Real > theta_d
Definition: ERF_InflowProfile.H:35
amrex::Gpu::DeviceVector< amrex::Real > tke_d
Definition: ERF_InflowProfile.H:35
amrex::Vector< amrex::Real > v
Definition: ERF_InflowProfile.H:32
amrex::Gpu::DeviceVector< amrex::Real > u_d
Definition: ERF_InflowProfile.H:35
amrex::Gpu::DeviceVector< amrex::Real > v_d
Definition: ERF_InflowProfile.H:35
amrex::Vector< amrex::Real > z
Host tables against height above the ground (strictly increasing)
Definition: ERF_InflowProfile.H:32
amrex::Vector< amrex::Real > u
Definition: ERF_InflowProfile.H:32

Referenced by ERF::init_inflow_profile().

Here is the caller graph for this function:

Member Data Documentation

◆ active

bool InflowProfile::active = false

◆ has_theta

bool InflowProfile::has_theta = false

◆ has_tke

bool InflowProfile::has_tke = false

◆ source

std::string InflowProfile::source

"log_law" or the profile file name

Referenced by ERF::init_inflow_profile(), make_log_law_inflow_profile(), and read_inflow_profile_file().

◆ theta

amrex::Vector<amrex::Real> InflowProfile::theta

◆ theta_d

amrex::Gpu::DeviceVector<amrex::Real> InflowProfile::theta_d

◆ tke

amrex::Vector<amrex::Real> InflowProfile::tke

◆ tke_d

amrex::Gpu::DeviceVector<amrex::Real> InflowProfile::tke_d

◆ u

amrex::Vector<amrex::Real> InflowProfile::u

◆ u_d

amrex::Gpu::DeviceVector<amrex::Real> InflowProfile::u_d

◆ v

amrex::Vector<amrex::Real> InflowProfile::v

◆ v_d

amrex::Gpu::DeviceVector<amrex::Real> InflowProfile::v_d

◆ z

amrex::Vector<amrex::Real> InflowProfile::z

Host tables against height above the ground (strictly increasing)

Referenced by ERF::init_inflow_profile(), make_log_law_inflow_profile(), and parse_inflow_profile().

◆ z_d

amrex::Gpu::DeviceVector<amrex::Real> InflowProfile::z_d

Device copies used by the boundary fills.


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