Skip to content

Commit 171101b

Browse files
committed
shift handling of the anydust variable
1 parent 9a9f73b commit 171101b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/clib/cool1d_multi_g.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,21 +194,12 @@ void grackle::impl::cool1d_multi_g(
194194

195195
// Iteration mask
196196

197-
gr_mask_type anydust, interp;
197+
gr_mask_type interp;
198198
std::vector<gr_mask_type> itmask_tab(my_fields->grid_dimension[0]);
199199

200200
// \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////
201201
// =======================================================================
202202

203-
// Set flag for dust-related options
204-
205-
if ((my_chemistry->h2_on_dust > 0) || (my_chemistry->dust_chemistry > 0) ||
206-
(my_chemistry->dust_recombination_cooling > 0)) {
207-
anydust = MASK_TRUE;
208-
} else {
209-
anydust = MASK_FALSE;
210-
}
211-
212203
// Set flag for needing interpolation variables
213204

214205
if ((my_chemistry->primordial_chemistry > 0) ||
@@ -1124,7 +1115,7 @@ void grackle::impl::cool1d_multi_g(
11241115
my_chemistry, my_rates, my_fields, idx_range, grain_temperatures,
11251116
logTlininterp_buf, cool1dmulti_buf, dom, coolunit, comp2, gasgr.data(),
11261117
myisrf.data(), alpha.data(), alphad.data(), internal_dust_prop_buf,
1127-
grain_kappa, kappa_tot.data(), gas_grainsp_heatrate, anydust);
1118+
grain_kappa, kappa_tot.data(), gas_grainsp_heatrate);
11281119

11291120
for (i = idx_range.i_start; i <= idx_range.i_end; i++) {
11301121
if (itmask[i] != MASK_FALSE) {

src/clib/dust/solver.hpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void solve_props_update_alpha_and_edot(
4040
double comp2, double* gasgr, double* myisrf, double* alpha, double* alphad,
4141
InternalDustPropBuf internal_dust_prop_buf,
4242
GrainSpeciesCollection grain_kappa, double* kappa_tot,
43-
GrainSpeciesCollection gas_grainsp_heatrate, gr_mask_type anydust) {
43+
GrainSpeciesCollection gas_grainsp_heatrate) {
4444
grackle::impl::View<gr_float***> d(
4545
my_fields->density, my_fields->grid_dimension[0],
4646
my_fields->grid_dimension[1], my_fields->grid_dimension[2]);
@@ -53,6 +53,15 @@ void solve_props_update_alpha_and_edot(
5353

5454
const double mh_local_var = mh_grflt;
5555

56+
// Set flag for dust-related options
57+
gr_mask_type anydust;
58+
if ((my_chemistry->h2_on_dust > 0) || (my_chemistry->dust_chemistry > 0) ||
59+
(my_chemistry->dust_recombination_cooling > 0)) {
60+
anydust = MASK_TRUE;
61+
} else {
62+
anydust = MASK_FALSE;
63+
}
64+
5665
// Compute grain size increment
5766
if ((my_chemistry->use_dust_density_field > 0) &&
5867
(my_chemistry->dust_species > 0)) {

0 commit comments

Comments
 (0)