-
Notifications
You must be signed in to change notification settings - Fork 0
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
Do not require get_form
in user code
#228
Conversation
@ddundo would it be worth adding a check in |
Thanks! I'll add this :) but the PR is still in draft phase so don't waste time looking into it now, as it might change :) I'll request a review soonish |
Ready now! Could you please review when you get the time? No rush at all. Most changes are in demos, where stuff in get_form was just moved to get_solver. So it's a much smaller PR than it looks :) |
transfer(self.solutions[f][FWD][i][j], u[f]) | ||
transfer(self.solutions[f][FWD_OLD][i][j], u_[f]) | ||
if self.field_types[f] == "unsteady": | ||
transfer(self.solutions[f][FWD_OLD][i][j], u_[f]) | ||
transfer(self.solutions[f][ADJ][i][j], u_star[f]) | ||
transfer(self.solutions[f][ADJ_NEXT][i][j], u_star_next[f]) |
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.
Updating forward
and forward_old
here only serves to update the coefficients in the form. Since there is no lagged solution in the variational form for "steady" fields, I do not update it here.
But the notion of a lagged solution still makes sense for "steady" fields in time-dependent problems. I kept this update for adjoint_next
since in the next few lines we compute the average of it and adjoint
. I'm not familiar with the theory here so I don't know if it makes sense or not, so I just left it as it is.
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.
(Unrelated to this issue :) )
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.
This is great @ddundo, thanks! Tidies things up very nicely.
Closes #223.
We only need the form when we do
GoalOrientedMeshSeq.indicate_errors
, so everything form-related was removed fromMeshSeq
andAdjointMeshSeq
. Communicating the form from user code toGoalOrientedMeshSeq
is now done with theread_forms
method.