-
Notifications
You must be signed in to change notification settings - Fork 160
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
Fieldsplit: replace empty Forms with ZeroBaseForm #3947
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rakeproject/firedrake into pbrubeck/fix/restricted-cofunction
|
|
pbrubeck
force-pushed
the
pbrubeck/simplify-indexed
branch
from
January 2, 2025 00:43
cf743a1
to
be6a7b4
Compare
pbrubeck
changed the title
DO NOT MERGE
Fieldsplit: replace empty Forms with ZeroBaseForm
Jan 2, 2025
pbrubeck
force-pushed
the
pbrubeck/simplify-indexed
branch
2 times, most recently
from
January 2, 2025 02:07
e0c7ba1
to
00b80e4
Compare
pbrubeck
force-pushed
the
pbrubeck/simplify-indexed
branch
from
January 2, 2025 05:41
00b80e4
to
bb04bb0
Compare
pbrubeck
commented
Jan 8, 2025
JHopeCollins
reviewed
Jan 9, 2025
JHopeCollins
reviewed
Jan 9, 2025
pbrubeck
force-pushed
the
pbrubeck/simplify-indexed
branch
from
January 9, 2025 14:47
d46a06e
to
2eb6a56
Compare
JHopeCollins
requested changes
Jan 9, 2025
JHopeCollins
previously requested changes
Jan 9, 2025
ksagiyam
previously requested changes
Jan 9, 2025
pbrubeck
force-pushed
the
pbrubeck/simplify-indexed
branch
from
January 9, 2025 17:48
2eb6a56
to
934ff6f
Compare
pbrubeck
force-pushed
the
pbrubeck/simplify-indexed
branch
from
January 15, 2025 13:09
1461270
to
7c2354e
Compare
pbrubeck
commented
Jan 15, 2025
ksagiyam
approved these changes
Jan 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This PR addresses the consequences of FEniCS/ufl#336, which introduces more agressive simplifications that cause empty forms to be returned when extracting a subblock that is supposed to be zero (e.g. the pressure block in Stokes).
Here empty Jacobians are replaced with ZeroBaseForm, as we require two Arguments in order for the adjoint to make sense.
The simplifications should also speed up code generation and even reduce flop counts in some cases.
Description update after merge:
This PR also includes updates from #3922. That PR changes the default behaviour of
assemble
when dealing with boundary conditions, and may also throw errors when trying to restore the old defaults. The description of that PR is:Description
This PR enables
solve(a == assemble(L), u, bcs, restrict={False|True})
without requiring users to set the boundary nodes to zero when they provide a Cofunction RHS. Here we also solved a few other issues:assemble(form, bcs, zero_bc_nodes=True)
is the new default, and for the False case we throw an error because we will try to apply primal inhomogenous data on a dual Cofunction.Depends on firedrakeproject/ufl#53
Fixes #3203, #3498, and #3130
Supersedes #3214, #3754