Nsupers Observer¶
Header file: <libs/observers/nsupers_observer.hpp>
[source]
-
struct NsupersFunc¶
Functor operator to perform a copy of the number of superdroplets in each gridbox “nsupers” to d_data within Kokkos::parallel_for loop over gridboxes with range policy.
Signature of operator such that type can be used by GenericCollectData struct for FunctorFunc.
Note: Conversion of nsupers from size_t (architecture-dependent, usually long unsigned int = 8 bytes) to single precision (uint32_t = 4 bytes).
- Param ii:
The index of the gridbox.
- Param d_gbxs:
The view of gridboxes on device.
- Param totsupers:
The view of superdroplets on device.
- Param d_data:
The mirror view buffer for the number of superdroplets.
Public Functions
-
inline void operator()(const size_t ii, viewd_constgbx d_gbxs, const viewd_constsupers totsupers, Buffer<uint32_t>::mirrorviewd_buffer d_data) const¶
-
template<typename Store>
inline CollectDataForDataset<Store> auto CollectNsupers(const Dataset<Store> &dataset, const size_t maxchunk, const size_t ngbxs)¶ Constructs type sastifying the CollectDataForDataset concept for a given Store (using an instance of the GenericCollectData class) which writes the number of superdroplets in each gridbox “nsupers” during the functor call.
- Parameters:
dataset – The dataset to write nsupers to.
maxchunk – The maximum chunk size (number of elements).
ngbxs – The number of gridboxes.
- Returns:
CollectDataForDataset<Store> An instance satisfying the CollectDataForDataset concept for collecting the number of superdroplets in each gridbox.
-
template<typename Store>
inline Observer auto NsupersObserver(const unsigned int interval, const Dataset<Store> &dataset, const size_t maxchunk, const size_t ngbxs)¶ Constructs an observer which writes the number of superdroplets in each gridbox “nsupers” at start of each observation timestep to an array with a constant observation timestep “interval”.
- Template Parameters:
Store – Type of store for dataset.
- Parameters:
interval – Observation timestep.
dataset – Dataset to write time data to.
maxchunk – Maximum number of elements in a chunk (1-D vector size).
ngbxs – The number of gridboxes.
- Returns:
Observer An observer instance for writing the number of superdroplets.