Fixes for 1D examples#553
Conversation
Fix by merging in changes from 1D-threshold. The neutral_parallel_diffusion diffusion mode is changed to "multispecies" from the default "afn" so that neutral-neutral collisions are included.
Just in case there are no collisions, limit the collision frequency to a small non-zero value.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #553 +/- ##
==========================================
+ Coverage 47.29% 48.54% +1.25%
==========================================
Files 96 96
Lines 9828 9842 +14
Branches 1428 1435 +7
==========================================
+ Hits 4648 4778 +130
+ Misses 4704 4574 -130
- Partials 476 490 +14 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
If species1 was charged and species2 was neutral then the `ion_neutral` option was not used: These collisions were always included. The `ion_neutral` option was used in neutral/charged collisions. This was caught by the new GuardedOptions system. Thanks Chris!
Updated so they run when restarted from 1D-hydrogen
Would have caught the issue with ion_neutral switch.
| 29.91 | ||
| - log((Z1 * Z2 * (AA1 + AA2)) / (AA1 * Tlim2 + AA2 * Tlim1) | ||
| * sqrt(Nlim1 * SQ(Z1) / Tlim1 + Nlim2 * SQ(Z2) / Tlim2)); | ||
| * sqrt((Nlim1 * SQ(Z1) / Tlim1) + (Nlim2 * SQ(Z2) / Tlim2))); |
There was a problem hiding this comment.
I am hoping this change is just style preference and C++ doesn't do something bizarre to make these brackets necessary?
There was a problem hiding this comment.
That is clang-tidy - it likes to make it obvious that * has precedence before + 🤷
| } else { | ||
| // species1 charged, species2 neutral | ||
|
|
||
| if (!ion_neutral) { |
There was a problem hiding this comment.
Thanks for spotting this. It could explain the difference we saw in the ReMKiT1D benchmark when adding neutrals!
|
Thanks for this @bendudson. I've gone through your changes and I can see that there must have been an issue where |
|
Hey @mikekryjak ! The |
Going through examples, to fix issue #547