Skip to content

Conversation

@ksagiyam
Copy link
Contributor

@ksagiyam ksagiyam commented Oct 14, 2020

This PR is to refactor driver.py and kernel_interface.

We introduce new classes TSFCFormData and TSFCIntegralData (that mimic ufl.FormData and ufl.IntegralData), in the constructors of which we preprocess ufl.FormData and ufl.IntegralData as much as possible, extracting only essential information for KernelBuilders. This narrows down the scope of KernelBuilders.
TSFCFormData can also take multiple ufl.FormDatas and combine them.

Several tasks done in driver.compile_integral were factored out and turned into methods of KernelBuilderMixin class in kernel_interface.common: compile_ufl, compile_gem, etc. This simplifies driver.compile_integral a lot, and the contents of this function can now optionally be exposed in the problem solving environments' TSFC interface (such as firedrake/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

@ReubenHill
Copy link
Contributor

@ksagiyam can you rebase onto master?

@ksagiyam ksagiyam force-pushed the ksagiyam/tsfc_refactor branch from 18013b4 to 3e15b16 Compare December 10, 2020 11:52
@ksagiyam
Copy link
Contributor Author

Rebased. Thanks.

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