-
Notifications
You must be signed in to change notification settings - Fork 166
Update BCS for forward recomputation #4408
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
base: master
Are you sure you want to change the base?
Conversation
if u: | ||
r.assign(u - self.function_arg, subset=self.node_set) | ||
r.assign(u - bc, subset=self.node_set) |
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.
It is still missing a test for this case.
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.
You will get this case by passing pre_apply_bcs=False
to the NLVS
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.
Thank you.
bc_checkpointed = self.block_variable.checkpoint | ||
bc = bc_checkpointed.checkpoint \ | ||
if bc_checkpointed is not None else self.function_arg |
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.
Can this logic be put into a new property that gets overloaded in the corresponding adjoint subclass of DirichletBC?
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.
Yes, it must be. I am still checking to see if this works. It looks like it requires more thought. Sia just wrote that this is leading some Gadopt tests to fail.
I know this is still wip, but flagging that this breaks one of our tests and the unit test here. Our CI is failing as we load the BC from a checkpoint file:
|
Description
This PR seeks to fix the issue #4387, which is related to the Nonlinear Variational Solve not updating the Dirichlet boundary conditions based on the checkpointed functions.