-
Notifications
You must be signed in to change notification settings - Fork 13
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
Spectral Deferred Correction #497
Conversation
…etc. need to be added
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.
This looks great! It's well documented and clear. I have only one tiny comment about docstrings.
If you think we will never use SDC with limiters or wrappers, feel free to remove all of that code.
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.
This looks great, thanks Alex! Only a couple of tiny quibbles about comments...
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.
Awesome - we're good to go!
Pull request to push SDC code to main. Code is in
sdc.py
and uses external dependency qmat to generate nodes, Q matrices, Qdelta matrices and final update weights. The code has one unified algorithm for Implicit, Explicit and IMEX SDC variants, with labelling of terms defined by the user. Both zero-to-node and node-to-node formulations available, defined when creating the time discretisation. These formulations are:Node-to-node:
y_m^(k+1) = y_(m-1)^(k+1) + dtau_m*(F(y_(m)^(k+1)) - F(y_(m)^k)) + sum(j=1,M) s_mj*F(y_(m-1)^k)
where s_mj = q_mj - q_(m-1)j for entires q_ik in Q.
Zero-to-node:
y_m^(k+1) = y_n + sum(j=1,M) q'mj*(F(y_j^(k+1)) - F(y_j^k))+ sum(j=1,M) q_mj*F(y(m-1)^k)
for entires q_mj in Q and q'_mj in Q_delta.
The code is tested in
integration-tests/model/test_sdc.py
.