Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newton error propagation based convergence check. #1403

Merged
merged 9 commits into from
Aug 29, 2024
Merged

Conversation

1uc
Copy link
Collaborator

@1uc 1uc commented Aug 19, 2024

Since we have access to the Jacobian, we can use Newton error propagation:

err = sum(J**2 * sd**2) ** 0.5

with sd = eps * X to estimate the impact of roundoff errors on F.

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 6 lines in your changes missing coverage. Please review.

Project coverage is 86.54%. Comparing base (198eabd) to head (bcffce6).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/codegen/codegen_neuron_cpp_visitor.cpp 33.33% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1403      +/-   ##
==========================================
- Coverage   86.56%   86.54%   -0.03%     
==========================================
  Files         182      182              
  Lines       13549    13559      +10     
==========================================
+ Hits        11729    11734       +5     
- Misses       1820     1825       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Aug 19, 2024
@1uc 1uc marked this pull request as ready for review August 22, 2024 07:57
@1uc 1uc marked this pull request as draft August 22, 2024 07:57
bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Aug 23, 2024
@bbpbuildbot

This comment has been minimized.

bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Aug 26, 2024
@bbpbuildbot

This comment has been minimized.

@1uc 1uc marked this pull request as ready for review August 26, 2024 13:54
Copy link
Member

@matz-e matz-e left a comment

Choose a reason for hiding this comment

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

Looks sensible.

src/solver/newton/newton.hpp Show resolved Hide resolved
Instead of `(X - X_old) = dt * dX`. The implemented scaling is the one
implemented in NOCMODL. It should prevent the residual from growing
linearly with `dt`.
Includes a test that solves the pump equation

    ~ X + Y <-> Z

with extreme compartment sizes and steady state calculation.
bbpadministrator pushed a commit to BlueBrain/nmodl-references that referenced this pull request Aug 29, 2024
@bbpbuildbot
Copy link
Collaborator

Logfiles from GitLab pipeline #228874 (:white_check_mark:) have been uploaded here!

Status and direct links:

@1uc 1uc merged commit 7984a45 into master Aug 29, 2024
24 checks passed
@1uc 1uc deleted the 1uc/steady-state branch August 29, 2024 12:47
1uc added a commit that referenced this pull request Aug 30, 2024
1uc added a commit that referenced this pull request Aug 30, 2024
1uc added a commit that referenced this pull request Sep 2, 2024
1uc added a commit that referenced this pull request Sep 12, 2024
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.

4 participants