[newchem-cpp] transcribe calc_all_tdust_gasgr_1d_g#485
Conversation
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
…tps://github.com/ChristopherBignamini/grackle into newchem-cpp_transcribe_calc_all_tdust_gasgr_1d_g
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
|
This looks great. There's unfortunately a complication. The Complication:I forgot to reiterate that you should be doing the dust chemistry transcription stuff working off of PR #447 (it would probably be even better to work off of #464) For some context:
How to fix thisImportant Let me know if you would prefer that I just pull a copy of this branch and fix the issues myself. It would probably only take ~15 minutes In any event, I think the best path forward is to merge #464 into this PR, and then stack the remaining transcription PRs off of this one. When you merge #464 onto this PR, there is going to be a minor merge-conflict. The easiest way to solve this involves:
grackle::impl::GrainMetalInjectPathways* inject_pathway_props =
my_rates->opaque_storage->inject_pathway_props;
double dlog10Tdust = 0.0;
double* log10Tdust_vals = nullptr;
// NOTE: gr_N and gr_Size are historical names
// -> they are pretty uninformative and should be changed!
int gr_N[2] = {0, 0};
int gr_Size = 0;
if (inject_pathway_props != nullptr) {
dlog10Tdust =
inject_pathway_props->log10Tdust_interp_props.parameter_spacing[0];
log10Tdust_vals =
inject_pathway_props->log10Tdust_interp_props.parameters[0];
gr_N[0] = inject_pathway_props->n_opac_poly_coef;
gr_N[1] = static_cast<int>(
inject_pathway_props->log10Tdust_interp_props.dimension[0]);
};
gr_Size = gr_N[0] * gr_N[1];
|
|
While you are making the changes, it would be great if you could move the file into the dust sub-directory (but no pressure if you don't get to it) |
|
Just an FYI: when you do the merge make sure you use the most up-to-date version of PR #464. There were some annoying merge conflicts between that branch and the main branch that I resolved yesterday |
…_increment_1d' into newchem-cpp_transcribe_calc_all_tdust_gasgr_1d_g
…tps://github.com/ChristopherBignamini/grackle into newchem-cpp_transcribe_calc_all_tdust_gasgr_1d_g
|
pre-commit.ci autofix |
for more information, see https://pre-commit.ci
…transcribe_calc_all_tdust_gasgr_1d_g
mabruzzo
left a comment
There was a problem hiding this comment.
Looks good to me! I left a few superficial suggested changes to tweak the format of some comments. But, I'm happy to merge now and deal with those later.
Note for when you resolve the merge conflicts:
- if #521 has been merged into newchem-cpp, everything will be great
- if #521 hasn't been merged upstream yet, you should explicitly merge it here before you format the code. (That PR properly fixes a clang-format error, whereas the default automatic fix moves happens to move a
// NOLINTcomment to a bad location)
@brittonsmith, I'm happy to see this merged
| // -> this is ONLY used when `itmask_metal .eq. MASK_TRUE` | ||
|
|
There was a problem hiding this comment.
| // -> this is ONLY used when `itmask_metal .eq. MASK_TRUE` | |
| // -> this is ONLY used when `itmask_metal[i] == MASK_TRUE` |
| // ! in UV, absorption coefficient Q ~ 1 (Goldsmith 2001) | ||
| // ! so we use the geometrical cross-section of grains [cgs] |
There was a problem hiding this comment.
| // ! in UV, absorption coefficient Q ~ 1 (Goldsmith 2001) | |
| // ! so we use the geometrical cross-section of grains [cgs] | |
| // in UV, absorption coefficient Q ~ 1 (Goldsmith 2001) | |
| // so we use the geometrical cross-section of grains [cgs] |
| mygisrf[i] = my_rates->gamma_isrf * | ||
| my_chemistry->local_dust_to_gas_ratio / dust2gas[i] * | ||
| metallicity[i]; | ||
| // ! correct with the depletion or enhancement of condensation rate. |
There was a problem hiding this comment.
| // ! correct with the depletion or enhancement of condensation rate. | |
| // correct with the depletion or enhancement of condensation rate. |
| /// @param[in] grain_kappa Grain species opacity collection | ||
| /// | ||
| /// @par History | ||
| /// modified: January, 2026 by Christopher Bignamini & Matthew Abruzzo; C++ port |
There was a problem hiding this comment.
| /// modified: January, 2026 by Christopher Bignamini & Matthew Abruzzo; C++ port | |
| /// modified: January, 2026 by Christopher Bignamini; C++ port |
No description provided.