Skip to content

[newchem-cpp] transcribe calc_grain_size_increment_species_1d#507

Open
ChristopherBignamini wants to merge 65 commits intograckle-project:newchem-cppfrom
ChristopherBignamini:newchem-cpp_transcribe_calc_grain_size_increment_species_1d
Open

[newchem-cpp] transcribe calc_grain_size_increment_species_1d#507
ChristopherBignamini wants to merge 65 commits intograckle-project:newchem-cppfrom
ChristopherBignamini:newchem-cpp_transcribe_calc_grain_size_increment_species_1d

Conversation

@ChristopherBignamini
Copy link
Contributor

This PR requires some additional work to fix a numerical issue which occurs in a call with j=k=0 and first iteration of i-loop (j=k=1 in Fortran), when coef3 is equal to zero. I temporarily added a line to skip the cubic equation solution in this case and we need to find a final fix.

Essentially, this type holds pointers to the various injection pathway
fields in the order that is implicitly assumed throughout the codebase.
This change helps simplify make_consistent and it will also simplify
`calc_grain_size_increment_1d` (once transcribed). Longer term, I have a
plan that will let use dispose of this ``InjectPathFieldPack`` type
(but, we need to make a few changes before we get to that).
Introduce the start_idx and stop_idx members to the struct
Use the start_idx and stop_idx members to simplify make_consistent
I was expecting this to cause gold-standard drift (but that doesn't seem
to be the case)
pre-commit-ci bot and others added 22 commits January 8, 2026 23:29
…_increment_1d' into newchem-cpp_transcribe_calc_all_tdust_gasgr_1d_g
@ChristopherBignamini ChristopherBignamini changed the title Newchem cpp transcribe calc grain size increment species 1d [newchem-cpp] transcribe calc_grain_size_increment_species 1d Feb 16, 2026
…transcribe_calc_grain_size_increment_species_1d
@ChristopherBignamini ChristopherBignamini changed the title [newchem-cpp] transcribe calc_grain_size_increment_species 1d [newchem-cpp] transcribe calc_grain_size_increment_species_1d Feb 16, 2026
@ChristopherBignamini
Copy link
Contributor Author

pre-commit.ci autofix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants