This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
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.
This PR is to refactor
driver.py
andkernel_interface
.We introduce new classes
TSFCFormData
andTSFCIntegralData
(that mimicufl.FormData
andufl.IntegralData
), in the constructors of which we preprocessufl.FormData
andufl.IntegralData
as much as possible, extracting only essential information forKernelBuilder
s. This narrows down the scope ofKernelBuilder
s.TSFCFormData
can also take multipleufl.FormData
s and combine them.Several tasks done in
driver.compile_integral
were factored out and turned into methods ofKernelBuilderMixin
class inkernel_interface.common
:compile_ufl
,compile_gem
, etc. This simplifiesdriver.compile_integral
a lot, and the contents of this function can now optionally be exposed in the problem solving environments' TSFC interface (such asfiredrake/tsfc_interface.py
), which allows for application of intermediate operations during compilation that only problem solving environments understand (such as finite element basis transformations).Firedrake needs to be adapted to these changes:
firedrakeproject/firedrake#1864