-
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
Make LinearSolver a subclass of LinearVariationalSolver #4012
base: pbrubeck/feature/fenics-bcs
Are you sure you want to change the base?
Conversation
|
|
529d226
to
59fc6ed
Compare
da40554
to
400ae30
Compare
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.
Rather than doing this would it not be possible to deprecate LinearSolver
in favour of LinearVariationalSolver
? I don't think wrapping one in the other makes sense in terms of code design.
There's still good use for this class, especially because it enables the user to provide multiple right-hand side and solution pairs. Another good reason is that this gives the user another way of preventing the Jacobian of being re-assembled. |
This PR is also paving the way for composing Fieldsplit and other solvers to solve systems with pre-assembled matrices and also more general |
But why is
Surely multiple methods to achieve the same result suggests that things should be combined?
Could we extend |
There are a couple of cases where
We could allow
Basically the PR consists mostly of enhacements to |
29ace44
to
e695cd2
Compare
Ah I see. Could we therefore think of this PR as a step along the way to fully removing |
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 I have only noted small things.
Also, does this PR add any new functionality? If so it would be great to test it.
Just a note to pay attention for adjoints: I am more concerned about how the adjoint-based gradients will work with |
Co-authored-by: Connor Ward <[email protected]>
@Ig-dolci We support variational problems defined purely in UFL, thus we get differentiability and adjoints. The enhacements are to do with Fieldsplit. |
41c12a0
to
292b083
Compare
292b083
to
ba4a055
Compare
824198c
to
7958933
Compare
Description
Provides enhacements for
LinearVariationalSolver
to support more genericMatrixBase
operators, and makesLinearSolver
a subclass ofLinearVariationalSolver
.Fixes #4016