Skip to content

changes default preconditioner threshold to zero#1344

Merged
ischoegl merged 1 commit intoCantera:mainfrom
kyleniemeyer:change-default-threshold
Jul 30, 2022
Merged

changes default preconditioner threshold to zero#1344
ischoegl merged 1 commit intoCantera:mainfrom
kyleniemeyer:change-default-threshold

Conversation

@kyleniemeyer
Copy link
Copy Markdown
Member

Changes proposed in this pull request

This pull request makes one small, simple change: the default threshold for using the adaptive preconditioner is now 0.0, rather than the (arbitrary) 1e-8.

@anthony-walker's study showed that using no threshold often leads to as good—and sometimes better—performance than an arbitrary threshold value, and setting a non-zero value should only be done intentionally by someone trying to tune for optimal performance.

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

Copy link
Copy Markdown
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be good to put the rationale for the change in the commit message so what's written in the PR is preserved.

@anthony-walker's study showed that using no threshold often leads to
as good—and sometimes better—performance than an arbitrary threshold
value, and setting a non-zero value should only be done intentionally by
someone trying to tune for optimal performance.
@kyleniemeyer kyleniemeyer force-pushed the change-default-threshold branch from 4c767e1 to 163d469 Compare July 30, 2022 15:59
@kyleniemeyer
Copy link
Copy Markdown
Member Author

@ischoegl good suggestion, done!

Copy link
Copy Markdown
Member

@ischoegl ischoegl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @kyleniemeyer! LGTM.

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 30, 2022

Codecov Report

Merging #1344 (163d469) into main (b86674c) will increase coverage by 0.11%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1344      +/-   ##
==========================================
+ Coverage   68.03%   68.15%   +0.11%     
==========================================
  Files         327      327              
  Lines       42652    42658       +6     
  Branches    17180    17180              
==========================================
+ Hits        29020    29074      +54     
+ Misses      11345    11291      -54     
- Partials     2287     2293       +6     
Impacted Files Coverage Δ
include/cantera/numerics/AdaptivePreconditioner.h 100.00% <ø> (ø)
src/oneD/Sim1D.cpp 74.01% <0.00%> (-0.27%) ⬇️
include/cantera/thermo/ThermoPhase.h 44.58% <0.00%> (+3.18%) ⬆️
include/cantera/cython/kinetics_utils.h 91.42% <0.00%> (+8.57%) ⬆️
src/kinetics/Kinetics.cpp 79.11% <0.00%> (+9.78%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@ischoegl ischoegl merged commit 12ea53d into Cantera:main Jul 30, 2022
@kyleniemeyer kyleniemeyer deleted the change-default-threshold branch July 30, 2022 16:47
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