-
Notifications
You must be signed in to change notification settings - Fork 178
TSFC: avoid setup of unused domains #4829
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
base: main
Are you sure you want to change the base?
Conversation
4d265ea to
4bb8288
Compare
connorjward
left a comment
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.
Thanks
| # so corresponding gem expression will never be needed. | ||
| expression = None | ||
| elif integral_type.startswith("interior_facet"): | ||
| return None |
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.
I think that here is another case of using Nones inappropriately, but that's not relevant here.
| dx1 = Measure("dx", mesh1) | ||
| dx2 = Measure("dx", mesh2) | ||
| ds1_ds2 = Measure("ds", mesh1, intersect_measures=(Measure("ds", mesh2),)) | ||
| ds1_ds2 = Measure("ds", mesh1, intersect_measures=(Measure("ds", mesh2), Measure("dx", mesh12))) |
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.
We are hitting an error for Forms involving legal integrals on codim 1 multidomain problems. We are able to assemble each term individually. However, the interface mesh must be included in every surface Measure if assembling all integrals all at once.
9f26aab to
c85d2b6
Compare
Description
A multi-domain Form is split into single-domain terms. Each term knows that it belongs to a multidomain problem, but is assembled individually. During the assembly of each single-domain term, we may skip the setup on the all the other domains.
firedrake/tsfc/driver.py
Lines 170 to 175 in 4a5cba1
These methods will now skip a mesh not found in
integral_data.domain_integral_type_map(as returned byufl.algorithms.compute_form_data).This is to remove the
integral_type = Noneentries that were hacked into thedomain_integral_type_map, which lead to obscure errors for illegal forms.