-
Notifications
You must be signed in to change notification settings - Fork 195
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
adapt_structure
for AbstractArray
boundary conditions invokes parent
#3286
Comments
adapt_structure
for BoundaryCondition
abstract arrays uses parent
adapt_structure
for AbstractArray
boundary conditions invokes parent
It looks like it dates back to ancient times practically before the invention of writing 7f4b78e#diff-ef43fe13b0bf0810d1bd93a5cd3264c3be46ba792948fad6a924a62b281e3286 I'm amazed nobody has caught this bug before. |
It may be the answer to several conundrums. Or simply not many use fields for BCs? |
@simone-silvestri may have tried. Not sure. @yuchenma23? |
Hi Greg, I was trying field as boundary condition but with time_interpolated_array Simone defined, which is used to interpolate field as a function of time. Essentially it's still a field boundary condition. It never worked on GPU with the bug that is related with some mismatch between types things. But it did work on CPU. I then got to work on other stuff and never went back to check the code. Perhaps the bug you fixed could explain the bug I faced. |
The fact that |
This prevents
Field
andOffsetArray
from being used as boundary conditions (correctly) --- if users try to useField
, they get different behavior on CPU vs GPU.I'm not sure the motivation for this choice.
Oceananigans.jl/src/BoundaryConditions/boundary_condition.jl
Lines 69 to 70 in e16cdc6
The text was updated successfully, but these errors were encountered: