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

Adaptive stepper #307

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

danvau98
Copy link

@danvau98 danvau98 commented Oct 4, 2024

Additional IMEX scheme with an embedded scheme to allow for adaptive stepping.

@danvau98
Copy link
Author

danvau98 commented Oct 4, 2024

I want to find some lower-order embedded methods that would increase the speed of these solvers. The Kennedy and Carpenter schemes are 4th and 5th-order; ideally, I should find a 3rd and 2nd-order scheme to add.

@bpbrown bpbrown self-requested a review October 12, 2024 21:20
@danvau98 danvau98 marked this pull request as draft October 18, 2024 14:48
@danvau98 danvau98 marked this pull request as ready for review October 18, 2024 14:49
@danvau98
Copy link
Author

Hi @bpbrown and @kburns, any suggestions for how this can be improved?

if i == self.stages-1:
# Swap the last row of H with b_hat
H[-1, :] = b_hat_IM
# A[-1, :] = b_hat_EX <- not sure if this is needed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is interesting. I have a few questions:

  • Did you check that you get the desired order of accuracy for both methods? I understand that you cannot just sum because of algebraic constraints. But if you solve, you are doing something different. If you get the correct order, is it by chance or is it expected?
  • Why did you comment out the above line? I would expect that it is needed in general.
  • How many more factorisations do you need with this scheme? The RK methods so far implemented in Dedalus are all singly diagonally implicit, such that you need only one factorisation per step. But I assume $\hat{b}s \neq H{ss}$, such that you need one more factorisation. If the step size is kept constant, do you need to factorize twice again in the next step or is there a cache?

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.

3 participants