@@ -25,13 +25,13 @@ namespace grackle::impl {
2525// / Calculate various dust related properties
2626// /
2727// / @todo
28+ // / All the following items should wait until after the transcription PRs for
29+ // / the wrapped Fortran routines are merged:
2830// / - Stop passing @p cool1dmulti_buf and instead pass the `mynh` and
29- // / `gasgr_tdust` members directly.
30- // / - The former is unmodified while the latter is used as a scratch buffer
31- // / - to minimize conflicts wait for the `calc_all_tdust_gasgr_1d_g`
32- // / transcription PR
33- // / - Make all non-modified `double*` arguments `const double` (this must wait
34- // / until after the transcription PRs for the wrapped fortran routines)
31+ // / `gasgr_tdust` members directly. The former is unmodified while the latter
32+ // / is used as a scratch buffer
33+ // / - Make all non-modified `double*` arguments `const double*`
34+ // / - rename the @p comp2 argument so that it's known as Tcmb
3535// /
3636// / @param[in] anydust Whether dust chemistry is enabled
3737// / @param[in] tgas 1d array of gas temperature
@@ -48,20 +48,20 @@ namespace grackle::impl {
4848// / @param[in] logTlininterp_buf hold values for each location in @p idx_range
4949// / that are used to linearly interpolate tables with respect to the
5050// / natural log of @p tgas.
51- // / @param[in,out] cool1dmulti_buf The mynh member holds a 1D array of number
52- // / densities while the gasgr_tdust member is just a scratch buffer
5351// / @param[in] comp2 Holds the CMB temperature at the current redshift
5452// / @param[out] dust2gas Holds the computed dust-to-gas ratio at each
5553// / location in the index range. In other words, this holds the dust mass
5654// / per unit gas mass (only used in certain configuration)
57- // / @param[in,out] myisrf a scratch buffer that may be used to temporarily
58- // / record the interstellar radiation field
5955// / @param[out] tdust, grain_temperatures dust temperatures may be written
6056// / to one of these variables, based on configuration
6157// / @param[out] gasgr, gas_grainsp_heatrate Grain/gas energy transfer rates may
6258// / be written to one of these variables, based on configuration
63- // / @param[out] grain_kappa, kappa_tot Opacity-related information may be
59+ // / @param[out] kappa_tot, grain_kappa Opacity-related information may be
6460// / written to one of these variables, based on configuration
61+ // / @param[in,out] cool1dmulti_buf The mynh member holds a 1D array of number
62+ // / densities while the gasgr_tdust member is just a scratch buffer
63+ // / @param[in,out] myisrf a scratch buffer that may be used to temporarily
64+ // / record the interstellar radiation field
6565// / @param[in,out] internal_dust_prop_buf Holds scratch-space for holding
6666// / grain-specific information
6767inline void dust_related_props (
@@ -70,11 +70,11 @@ inline void dust_related_props(
7070 chemistry_data* my_chemistry, chemistry_data_storage* my_rates,
7171 grackle_field_data* my_fields, InternalGrUnits internalu,
7272 IndexRange idx_range, LogTLinInterpScratchBuf logTlininterp_buf,
73- Cool1DMultiScratchBuf cool1dmulti_buf , double comp2 , double * dust2gas ,
74- double * myisrf , double * tdust, GrainSpeciesCollection grain_temperatures ,
75- double * gasgr, GrainSpeciesCollection gas_grainsp_heatrate ,
76- GrainSpeciesCollection grain_kappa, double * kappa_tot ,
77- InternalDustPropBuf internal_dust_prop_buf) {
73+ double comp2 , double * dust2gas , double * tdust ,
74+ GrainSpeciesCollection grain_temperatures , double * gasgr ,
75+ GrainSpeciesCollection gas_grainsp_heatrate, double * kappa_tot ,
76+ GrainSpeciesCollection grain_kappa, Cool1DMultiScratchBuf cool1dmulti_buf ,
77+ double * myisrf, InternalDustPropBuf internal_dust_prop_buf) {
7878 // get relevant unit values
7979 double dom = internalu_calc_dom_ (internalu);
8080 double coolunit = internalu.coolunit ;
@@ -139,7 +139,6 @@ inline void dust_related_props(
139139
140140 // compute dust temperature and cooling due to dust
141141 if (anydust != MASK_FALSE) {
142- // TODO: trad -> comp2
143142 grackle::impl::fortran_wrapper::calc_all_tdust_gasgr_1d_g (
144143 comp2, tgas, tdust, metallicity, dust2gas, cool1dmulti_buf.mynh ,
145144 cool1dmulti_buf.gasgr_tdust , itmask_metal, coolunit, gasgr, myisrf,
0 commit comments