Fix domain_integral_type_map - #4775
Conversation
connorjward
left a comment
There was a problem hiding this comment.
This is not obvious to me. Please can you amend the PR description to make it clear what this is fixing.
d4aa695 to
fa7037e
Compare
connorjward
left a comment
There was a problem hiding this comment.
The code is pretty opaque. But it is not worse than before and it fixes a bug. I'm sufficiently happy.
|
I've realised that this fix doesn't do the right thing. You can get this test to pass without needing to modify the mydx = Measure("dx", submesh, intersect_measures=(Measure("dx", mesh),))
A = assemble(inner(grad(usub) * q, grad(vsub))*mydx) |
|
I think I would be in favour of reverting this change. |
This is interesting, and very obscure. The relationship between the measures of a submesh and its parent should be somehow implied by default, or at least we should error when we detect that case. The previous error was not that informative. |
|
I think it is difficult to do things automatically for every case. For instance if doing an exterior facet integral over the submesh are the facets of the parent mesh interior or exterior? There are gonna be similar difficulties for facet submeshes (ie codim 1). We could probably reasonably get things to work automatically for cell integrals specifically, because there isn't this ambiguity. |
|
Can this be reverted? |
…firedrakeproject#4803) * Raise useful exception * Revert firedrakeproject#4775
Description
integral_data.domain_integral_type_mapwas not encoding domains of coefficients that are not defined on the integration domain.All domains in the form are mapped to
integral_type=None, but it seems that active coefficients needintegral_type="cell".