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

Different exponentiation methods in discretization #506

Open
mforets opened this issue Mar 5, 2019 · 1 comment
Open

Different exponentiation methods in discretization #506

mforets opened this issue Mar 5, 2019 · 1 comment

Comments

@mforets
Copy link
Member

mforets commented Mar 5, 2019

Having the second option seems unreasonable because we could already use the concrete matrix exponential in the discretization.

If i recall correctly, that option was a workaround for the fact that we use the same "exp_method" in the calculation of two different problems: ϕ and Phi2Aabs. But the latter is more costly than the former, since it is 3 times bigger. So the idea was to do lazy computations for the discretization and then transform to concrete ϕ in the iteration.

The code in that part (#503) is now:

    # compute matrix ϕ = exp(Aδ)
    ϕ = exp_Aδ(A, δ, exp_method=exp_method)

    # compute the transformation matrix to bloat the initial states
    Phi2Aabs = Φ₂(abs.(A), δ, exp_method=exp_method)

And it still doesn't let to choose between different exponentiation methods in ϕ and in Phi2Aabs.

I think that we can continue like this, and eventually add this option if needed.

Originally posted by @mforets in #465 (comment)

@schillic
Copy link
Member

schillic commented Mar 5, 2019

So the idea was to do lazy computations for the discretization and then transform to concrete ϕ in the iteration.

Yes, this was the idea of a very naive me. If the full matrix is computed from the lazy matrix, then there is no reason to compute it lazily in the first place. If that really was faster than computing the concrete matrix directly, then exp would do that internally already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants