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

#include <ERF_ActuatorDeviceBuffers.H>

Collaboration diagram for erf_actuator::ActuatorDeviceBuffers:

Public Attributes

StagedBuffer< amrex::Real > image_pos
 3 per image: its position (m) More...
 
StagedBuffer< int > image_point
 1 per image: the point it is an image of More...
 
StagedBuffer< int > image_reach
 18 per image: per face grid, the faces within its reach (lo x y z, hi x y z) More...
 
StagedBuffer< amrex::Real > point_eps
 2 per point: 1 / eps^2 and the squared cut-off radius 9 eps^2 More...
 
StagedBuffer< amrex::Real > scales
 3 per point: F_p / S_p (add_scaled_kernels) More...
 
StagedBuffer< amrex::Real > norms
 3 per point: the accumulators of S_p (spread_partial_norms) More...
 
StagedBuffer< int > bins
 
StagedBuffer< amrex::Real > sample_pos
 3 per point (m) More...
 
StagedBuffer< amrex::Real > sample_vel
 3 per point (m/s) More...
 
StagedBuffer< int > sample_cnt
 1 per point: how many of this rank's boxes hold it More...
 
amrex::Long kernel_launches {0}
 kernels launched through these buffers so far (for the tests) More...
 
bool force_face_major {false}
 

Detailed Description

The buffers of the spreading kernels (spread_partial_norms, add_scaled_kernels) and of the sampler (sample_velocity_local), kept by their caller so that a step allocates no device memory once the buffers have reached their size. Passing none makes a call use its own.

Member Data Documentation

◆ bins

StagedBuffer<int> erf_actuator::ActuatorDeviceBuffers::bins

◆ force_face_major

bool erf_actuator::ActuatorDeviceBuffers::force_face_major {false}

A switch for the unit tests only; a model leaves it false. When true, add_scaled_kernels() runs the face-by-face pass on the host too, which is the only pass a device has, so a CPU build can compare the two. Both give the same sources bit for bit; the face-by-face pass is the slower one on a host.

Referenced by erf_actuator::add_scaled_kernels().

◆ image_point

StagedBuffer<int> erf_actuator::ActuatorDeviceBuffers::image_point

1 per image: the point it is an image of

Referenced by erf_actuator::add_scaled_kernels().

◆ image_pos

StagedBuffer<amrex::Real> erf_actuator::ActuatorDeviceBuffers::image_pos

3 per image: its position (m)

Referenced by erf_actuator::add_scaled_kernels(), and erf_actuator::spread_partial_norms().

◆ image_reach

StagedBuffer<int> erf_actuator::ActuatorDeviceBuffers::image_reach

18 per image: per face grid, the faces within its reach (lo x y z, hi x y z)

Referenced by erf_actuator::add_scaled_kernels(), and erf_actuator::spread_partial_norms().

◆ kernel_launches

amrex::Long erf_actuator::ActuatorDeviceBuffers::kernel_launches {0}

kernels launched through these buffers so far (for the tests)

Referenced by erf_actuator::add_scaled_kernels(), erf_actuator::sample_velocity_local(), and erf_actuator::spread_partial_norms().

◆ norms

StagedBuffer<amrex::Real> erf_actuator::ActuatorDeviceBuffers::norms

3 per point: the accumulators of S_p (spread_partial_norms)

Referenced by erf_actuator::spread_partial_norms().

◆ point_eps

StagedBuffer<amrex::Real> erf_actuator::ActuatorDeviceBuffers::point_eps

2 per point: 1 / eps^2 and the squared cut-off radius 9 eps^2

Referenced by erf_actuator::add_scaled_kernels(), and erf_actuator::spread_partial_norms().

◆ sample_cnt

StagedBuffer<int> erf_actuator::ActuatorDeviceBuffers::sample_cnt

1 per point: how many of this rank's boxes hold it

Referenced by erf_actuator::sample_velocity_local().

◆ sample_pos

StagedBuffer<amrex::Real> erf_actuator::ActuatorDeviceBuffers::sample_pos

3 per point (m)

Referenced by erf_actuator::sample_velocity_local().

◆ sample_vel

StagedBuffer<amrex::Real> erf_actuator::ActuatorDeviceBuffers::sample_vel

3 per point (m/s)

Referenced by erf_actuator::sample_velocity_local().

◆ scales

StagedBuffer<amrex::Real> erf_actuator::ActuatorDeviceBuffers::scales

3 per point: F_p / S_p (add_scaled_kernels)

Referenced by erf_actuator::add_scaled_kernels().


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