You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// sorting needed only for diagnostics and coalescence
158
155
bool sorted;
@@ -293,6 +290,7 @@ namespace libcloudphxx
293
290
halo_size * (opts_init.nz + 1) * opts_init.ny // 3D
294
291
),
295
292
w_LS(opts_init.w_LS),
293
+
SGS_mix_len(opts_init.SGS_mix_len),
296
294
adve_scheme(opts_init.adve_scheme),
297
295
pure_const_multi (((opts_init.sd_conc) == 0) && (opts_init.sd_const_multi > 0 || opts_init.dry_sizes.size() > 0)) // coal prob can be greater than one only in sd_conc simulations
// check temporarily disabled since dewv_id is not passed anymore, TODO: fix it
86
-
// if (!(opts_init.x1 > opts_init.x0 && opts_init.x1 <= m1(opts_init.nx) * opts_init.dx) && dev_id == -1) // only for single device runs, since on multi_CUDA x1 is not yet adjusted to local domain
if (opts_init.dt == 0) throwstd::runtime_error("please specify opts_init.dt");
95
-
if (opts_init.sd_conc * opts_init.sd_const_multi != 0) throwstd::runtime_error("specify either opts_init.sd_conc or opts_init.sd_const_multi, not both");
96
-
if (opts_init.sd_conc == 0 && opts_init.sd_const_multi == 0 && opts_init.dry_sizes.size() == 0) throwstd::runtime_error("please specify opts_init.sd_conc, opts_init.sd_const_multi or opts_init.dry_sizes");
97
-
if (opts_init.coal_switch)
98
-
{
99
-
if(opts_init.terminal_velocity == vt_t::undefined) throwstd::runtime_error("please specify opts_init.terminal_velocity or turn off opts_init.coal_switch");
if(opts_init.terminal_velocity == vt_t::undefined) throwstd::runtime_error("please specify opts_init.terminal_velocity or turn off opts_init.sedi_switch");
104
-
if (opts_init.sedi_switch && opts_init.nz == 0)
105
-
throwstd::runtime_error("opts_init.sedi_switch can be True only if n_dims > 1");
106
-
if (opts_init.subs_switch && opts_init.nz == 0)
107
-
throwstd::runtime_error("opts_init.subs_switch can be True only if n_dims > 1");
108
-
if (opts_init.subs_switch && opts_init.nz != w_LS.size())
109
-
throwstd::runtime_error("opts_init.subs_switch == True, but subsidence velocity profile size != nz");
77
+
if (n_dims > 0)
78
+
{
79
+
if (!(opts_init.x0 >= 0 && opts_init.x0 < m1(opts_init.nx) * opts_init.dx))
// check temporarily disabled since dewv_id is not passed anymore, TODO: fix it
86
+
// if (!(opts_init.x1 > opts_init.x0 && opts_init.x1 <= m1(opts_init.nx) * opts_init.dx) && dev_id == -1) // only for single device runs, since on multi_CUDA x1 is not yet adjusted to local domain
if (opts_init.dt == 0) throwstd::runtime_error("please specify opts_init.dt");
95
+
if (opts_init.sd_conc * opts_init.sd_const_multi != 0) throwstd::runtime_error("specify either opts_init.sd_conc or opts_init.sd_const_multi, not both");
96
+
if (opts_init.sd_conc == 0 && opts_init.sd_const_multi == 0 && opts_init.dry_sizes.size() == 0) throwstd::runtime_error("please specify opts_init.sd_conc, opts_init.sd_const_multi or opts_init.dry_sizes");
97
+
if (opts_init.coal_switch)
98
+
{
99
+
if(opts_init.terminal_velocity == vt_t::undefined) throwstd::runtime_error("please specify opts_init.terminal_velocity or turn off opts_init.coal_switch");
if(opts_init.terminal_velocity == vt_t::undefined) throwstd::runtime_error("please specify opts_init.terminal_velocity or turn off opts_init.sedi_switch");
104
+
if (opts_init.sedi_switch && opts_init.nz == 0)
105
+
throwstd::runtime_error("opts_init.sedi_switch can be True only if n_dims > 1");
106
+
if (opts_init.subs_switch && opts_init.nz == 0)
107
+
throwstd::runtime_error("opts_init.subs_switch can be True only if n_dims > 1");
108
+
if (opts_init.turb_adve_switch && opts_init.nz == 0)
109
+
throwstd::runtime_error("opts_init.turb_adve_switch can be True only if n_dims > 1");
110
+
if (opts_init.turb_cond_switch && opts_init.nz == 0)
111
+
throwstd::runtime_error("opts_init.turb_cond_switch can be True only if n_dims > 1");
112
+
if (opts_init.subs_switch && opts_init.nz != w_LS.size())
113
+
throwstd::runtime_error("opts_init.subs_switch == True, but subsidence velocity profile size != nz");
114
+
if ((opts_init.turb_adve_switch || opts_init.turb_cond_switch) && opts_init.nz != SGS_mix_len.size())
115
+
throwstd::runtime_error("at least one of opts_init.turb_adve_switch, opts_init.turb_cond_switch is true, but SGS mixing length profile size != nz");
0 commit comments