-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Alternative interface to expv! #6
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
- Coverage 96.87% 96.86% -0.02%
==========================================
Files 4 6 +2
Lines 192 223 +31
==========================================
+ Hits 186 216 +30
- Misses 6 7 +1
Continue to review full report at Codecov.
|
Summary basically, this alternative method sounds interesting, we should definitely have it in ExponentialUtilities, it might not work with the higher order semilinear and first-order ODE exponential integrators, but it might be something we want to interface with in the splitting methods, so we should try to keep the interface the same as much as possible, but that might not be possible since it's adapting the Krylov subspace size |
src/krylov_expv.jl
Outdated
if m > Ks.maxiter | ||
resize!(Ks, m) | ||
else | ||
Ks.m = m # might change if happy-breakdown occurs |
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.
happy-breakdown occurs -> convergence criterion met
To be more specific, the issue lies with extending this alternative method to |
Nicely done. To complete things, can you add a keyword argument to |
I have addressed the comments above (I believe). There still remains the issue of allocation, but it is not huge, so can maybe rest for now. A similar approach for Arnoldi is possible using |
References for upper triangular matrix exponentials: |
As discussed in #1, I've implemented an alternative interface to
exvp!
for the Hermitian case, where the Krylov subspace is successively built up, but the iteration is terminated, if a stopping criterion based on an exponentiation error estimate is fulfilled. For time-stepping, where the error of the exponentiation, and not the condition number of the Krylov subspace, is important, I have found this to be a more reliable indicator of when to terminate the iteration.cache
vector, which I skipped. Instead I use the "next" vector in the subspace, i.e.V[:,j+1]
, wherecache
after being orthogonalized and scaled would end up anyway. I have not, however, removed it from the call signature, since I still need to clean everywhere inkrylov_phiv_adaptive.jl
, which was not as fun to do.@. V[:, 1] = 1 / beta
lmul!(1/beta, @view(V[:, 1])
verbose
flag? I think it is nice to have when debugging time-stepping algorithms.LinearAlgebra
.As an example of usage and its performance, see the following code (which also doubles as the test):
n=300
n=3000