-
Notifications
You must be signed in to change notification settings - Fork 194
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
Broadcasting and operations on different Field types #12
Comments
Maybe we should take a step back and think about what our goal is? What do we want from this system? Will this simplify the MITgcm algorithm? |
I think broadcasting for same-field operators, e.g. But cross-field broadcasting is a bit trickier so might be better to leave it unimplemented especially as it's not a very common operation, I only use it when adding I feel like everyone has a different opinion on this but in my mind, I'm thinking this would make the code easier to read and write (short-term), and ultimately easier to extend by users (long-term). I just sometimes use issues leave random TODO notes and ramble. |
Will not implement cross-field operations for now, e.g. |
Reopening as this is becoming relevant for online diagnostics which may need a lot of these operations. E.g. |
This was resolved in PR #463. |
Bootstrap package use PkgTemplates.jl
Right now I've decided to not implement broadcasting for Field types. It would be really nice but I'd have to figure out how to take into account the different field types, e.g. can broadcast
T .+ S
as they're both of typeCellField
but notu .+ v
asu::FaceFieldX, v::FaceFieldY
.Maybe even take it further and implement
u .+ v
which would have to dou .+ avgx(avgy(v))
, and isn't commutative anymore.The text was updated successfully, but these errors were encountered: