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

refactor driver.py and kernel_interface #234

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

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
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.

2 participants