-
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
Add __str__ method for SolverVarFormBlock #3199
Conversation
Co-authored-by: Jack Betteridge <[email protected]>
I will mark this PR as draft for now since we want to land the UFL PR first. |
We need to update our UFL fork now. This might be complicated since there is already a longstanding PR to do this. @nbouziani what is the status of that? |
That PR was for the dual changes and is out-of-date given that we merged UFL upstream after that. However, I recently noticed that the recent UFL changes with the new finite element interface have caused some of our tests to fail. There seem to be minor things to change first in firedrake and tsfc to update our UFL fork successfully. |
Is someone willing to take that on? @nbouziani @Ig-dolci? |
I will work on this today. |
I just figured out that these PRs 3166 and 302 are aiming to update firedrake and tsfc for the latest ufl (upstream) interface. |
@@ -600,6 +600,9 @@ def _init_solver_parameters(self, args, kwargs): | |||
super()._init_solver_parameters(args, kwargs) | |||
solve_init_params(self, args, kwargs, varform=True) | |||
|
|||
def __str__(self): | |||
return f"solve({ufl2unicode(self.lhs)} == {ufl2unicode(self.rhs)})" |
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.
Need to cast the rhs to ufl.
This PR is incorrect. I did not realise that |
Description
Adding
__str__
method in theSolverVarFormBlock
.The
__str__
is useful to visualise the tape DAG.The
ufl2unicode(self.lhs)
is going to fail raised by a ufl bug. I have opened a UFL PR to fix it.Obs:
Thank you Connor for helping me with the UFL fail.:)