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

Merge options for lazy matrix exponential in discretization #465

Closed
schillic opened this issue Feb 17, 2019 · 1 comment
Closed

Merge options for lazy matrix exponential in discretization #465

schillic opened this issue Feb 17, 2019 · 1 comment

Comments

@schillic
Copy link
Member

schillic commented Feb 17, 2019

We have the options :lazy_expm and :lazy_expm_discretize. The latter controls whether we use a lazy matrix exponential during discretization. The former controls whether we convert the matrix to a concrete matrix after discretization (see here).
Having the second option seems unreasonable because we could already use the concrete matrix exponential in the discretization. (Careful when removing that function, as it calls another function in the end. This other function should then be called directly from the call site.)

Furthermore, we have the option :pade_expm. We could merge these settings by changing the value to a string. The available choices would then be "none" (default), "exp" (in the previous Julia versions the function was called expm), and "pade".

@schillic schillic changed the title Merge options lazy_expm and lazy_expm_discretize Merge options for lazy matrix exponential in discretization Feb 17, 2019
@schillic schillic added this to the Refactor options milestone Feb 17, 2019
@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.

EDIT: i've opened #506 for the continuation

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