This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 49
Component-wise relative and absolute tolerances #93
Open
sonVishal
wants to merge
15
commits into
SciML:master
Choose a base branch
from
sonVishal:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c2de029
Component-wise RelTol and AbsTol for Explicit Solvers similar to Solv…
sonVishal 42f6b45
Pre .gitignore changes
sonVishal 0eeb96b
Post .gitignore changes
sonVishal 444468e
Updated the files with comments
sonVishal 23349f3
Fixed the error in line 70 in ODE.jl
sonVishal 740b05e
Added Travis file as required
sonVishal 58bd9ca
Corrected the runtest.jl Robertson test case and removed the comments.
sonVishal 936931a
Was using Inf norm for err.
sonVishal 9c89efb
Component-wise reltol for ode23s.
sonVishal 84d01ad
Component-wise reltol for ode23s.
sonVishal d38fa7d
Merge branch 'master' of https://github.com/sonVishal/ODE.jl
sonVishal 76a8e05
Had written the if statements the other way around.
sonVishal ea10a9d
Implemented getScaledError as a multiple dispatch function for both s…
sonVishal d68c1a0
Added abs() function which can handle arrays of CompSol to interface-…
sonVishal f256c4d
Change ROBER testcase relTol and absTol to arrays
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than using abs here, we should allow using a custom norm function. Look at how eg ode23s does this, and pass that norm along to hinit as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I ask why abs(x0) is not suitable over here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're letting the user pass a custom norm function into the solver, we should use that here too - it's an oversight that this isn't already the case. I just think that if we touch these lines anyway, we might as well fix that (and if we don't, we should keep using norm here to make the transition easier later).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, this has nothing to do with the norm. As per the comments hinit is based on 'Solving Ordinary Differential Equations I' by Hairer and Wanner page 169 - The tau in the code is the same as the 'sc' variable in the book which is component-wise rather than a norm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use an L-infinity norm, doesn't that correspond to component-wise convergence?
....I see, you want to use a separate tolerance for each component, which is more than just changing the norm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L-infinity would simply take the maximum over all the components.
Sometimes the solution is more sensitive w.r.t. only a component and you would thus want to control that component with a stricter tolerance and have relaxed tolerances for the other tolerances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "Hairer norm" used here isn't necessarily a norm because of how it it does the normalization. But the tau here is not the standard sc since sc is the sum of the adjusted tolerances, not the max. In practice this shouldn't matter much though.