Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/libcloudph++/lgrngn/particles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ namespace libcloudphxx
virtual void diag_incloud_time_mom(const int&) { assert(false); } // requires opts_init.diag_incloud_time==true
virtual void diag_max_rw() { assert(false); }
virtual void diag_vel_div() { assert(false); }
virtual int diag_sstp_coal() { assert(false); }
virtual std::map<libcloudphxx::common::output_t, real_t> diag_puddle() { assert(false); return std::map<libcloudphxx::common::output_t, real_t>(); }
virtual real_t *outbuf() { assert(false); return NULL; }

Expand Down Expand Up @@ -197,6 +198,7 @@ namespace libcloudphxx
void diag_precip_rate();
void diag_max_rw();
void diag_vel_div();
int diag_sstp_coal();
std::map<libcloudphxx::common::output_t, real_t> diag_puddle();
real_t *outbuf();

Expand Down Expand Up @@ -294,6 +296,7 @@ namespace libcloudphxx
void diag_precip_rate();
void diag_max_rw();
void diag_vel_div();
int diag_sstp_coal();
std::map<libcloudphxx::common::output_t, real_t> diag_puddle();

struct impl;
Expand Down
7 changes: 7 additions & 0 deletions src/particles_diag.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,13 @@ namespace libcloudphxx
thrust::sequence(pimpl->count_ijk.begin(), pimpl->count_ijk.end());
}

// to get current value of sstp_coal, as it can change in const_multi runs
template <typename real_t, backend_t device>
int particles_t<real_t, device>::diag_sstp_coal()
{
return pimpl->opts_init.sstp_coal;
}

// compute 1st (non-specific) moment of rw^3 * vt of all SDs
// TODO: replace it with simple diag vt?
template <typename real_t, backend_t device>
Expand Down
6 changes: 6 additions & 0 deletions src/particles_multi_gpu_diag.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ namespace libcloudphxx
pimpl->mcuda_run(&particles_t<real_t, CUDA>::diag_vel_div);
}

template <typename real_t>
int particles_t<real_t, multi_CUDA>::diag_sstp_coal()
{
throw std::runtime_error("diag_sstp_coal is not implemented yet for the multi_CUDA backend");
}

template <typename real_t>
void particles_t<real_t, multi_CUDA>::diag_sd_conc()
{
Expand Down