Skip to content
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

Open boundary conditions do not work for windowed fields #3833

Open
simone-silvestri opened this issue Oct 8, 2024 · 2 comments · May be fixed by #3834
Open

Open boundary conditions do not work for windowed fields #3833

simone-silvestri opened this issue Oct 8, 2024 · 2 comments · May be fixed by #3834

Comments

@simone-silvestri
Copy link
Collaborator

simone-silvestri commented Oct 8, 2024

There is some problem with open boundary conditions and windowed fields
MWE:

grid = RectilinearGrid(size = (5, 5, 5), extent = (1, 1, 1), topology  = (Bounded, Bounded, Bounded))
u, v, _ = Oceananigans.Fields.VelocityFields(grid)
V = Field(v, indices = (:, :, 5))
fill!(V, 1)
Oceananigans.BoundaryConditions.fill_halo_regions!(V)

I would expect that V[:, 1, :] = 0 but

julia> V[:, 1, :]
11×1 OffsetArray(::Matrix{Float64}, -2:8, 5:5) with eltype Float64 with indices -2:8×5:5:
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
 1.0
@simone-silvestri
Copy link
Collaborator Author

We are probably also lacking a lot of tests for fill halo regions

@simone-silvestri simone-silvestri linked a pull request Oct 8, 2024 that will close this issue
@glwagner
Copy link
Member

glwagner commented Oct 8, 2024

What are the boundary conditions on V

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants