dsl: Introduce abstractions for multi-stage time integrators#2599
Open
fernanvr wants to merge 26 commits intodevitocodes:mainfrom
Open
dsl: Introduce abstractions for multi-stage time integrators#2599fernanvr wants to merge 26 commits intodevitocodes:mainfrom
fernanvr wants to merge 26 commits intodevitocodes:mainfrom
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation of the ideas of @mloubout, as discussed in the Slack channel #timestepping.
It were created two new classes:
MultiStage: Each instance represents a combination of a PDE and its associated time integrator.
RK: Instances encapsulate a Butcher Tableau. The class methods define specific Runge-Kutta schemes, and it includes logic to expand a single PDE into multiple stage equations according to the RK method. It only contains the classic RK44, of fourth order and four stages, as a prove of concept.
To integrate the
MultiStageinto Devito’s pipeline, we modified the_lower(...)function inoperator.pyby adding the line:expressions = cls._lower_multistage(expressions, **kwargs),and
modified _sanitize_exprs(cls, expressions, **kwargs)to recognizeMultiStageinstances.We also created a new function:
_lower_multistage(),in the same file. This function handles the expansion of
MultiStageinstances into their corresponding stage equations.