- 
                Notifications
    You must be signed in to change notification settings 
- Fork 250
Validate location input to FieldBoundaryConditions #4760
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: main
Are you sure you want to change the base?
Conversation
| """ | ||
| function FieldBoundaryConditions(grid::AbstractGrid, loc, indices=(:, :, :); | ||
| function FieldBoundaryConditions(grid::AbstractGrid, loc::Tuple, indices=(:, :, :); | ||
| west = default_auxiliary_bc(grid, Val(:west), loc), | 
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.
We could also just always instantiate the location, so that the constructors would work with both instantiated and non-instantiated locations.
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.
I think it may be a better/simpler design to require instantiation. I don't think it is inconvenient practically and simplifies using/reading code.
| end | ||
|  | ||
| FieldBoundaryConditions(mrg::MultiRegionGrids, loc, indices; kwargs...) = | ||
| FieldBoundaryConditions(mrg::MultiRegionGrids, loc::Tuple, indices::MultiRegionObject; kwargs...) = | 
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.
@simone-silvestri is this the 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.
oh, I guess we are missing an import Oceananigans.BoundaryConditions: FieldBoundaryConditions?
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.
that was definitely missing (otherwise this method doesn't extend anything) but also that didn't fix it hmm
Resolves #4759