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

Bug fix for TrustRegion when iip=true. #125

Merged
merged 8 commits into from
Jan 19, 2023

Conversation

Deltadahl
Copy link
Contributor

@Deltadahl Deltadahl commented Jan 19, 2023

This is an attempt to fix the bug that currently exists in the TrustRegion solver when iip=true #124.
The bug went trough testing because the tests did not take the absolute value, allowing all negative values to pass, i.e. @test all(sol.u .* sol.u .- 2 .< 1e-9) and not @test all(abs.(sol.u .* sol.u .- 2) .< 1e-9) as it should be.

The bug is due to that cache.u and cache.fu points to the same vector as cache.u_tmp and cache.fu_new respectively, and then both of them get changed at unwanted places.

@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Merging #125 (69350aa) into master (9049a3c) will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
+ Coverage   89.21%   89.36%   +0.15%     
==========================================
  Files           6        6              
  Lines         343      348       +5     
==========================================
+ Hits          306      311       +5     
  Misses         37       37              
Impacted Files Coverage Δ
src/trustRegion.jl 98.30% <100.00%> (+0.07%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ChrisRackauckas ChrisRackauckas merged commit c737bd2 into SciML:master Jan 19, 2023
avik-pal pushed a commit that referenced this pull request Nov 1, 2024
Add NLsolve update rule to SimpleTrustRegion
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