Skip to content

Failure to account for periodicity in set! on TripolarGrid #4243

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
glwagner opened this issue Mar 18, 2025 · 0 comments
Open

Failure to account for periodicity in set! on TripolarGrid #4243

glwagner opened this issue Mar 18, 2025 · 0 comments

Comments

@glwagner
Copy link
Member

Consider

using Oceananigans
using GLMakie

Nx = Ny = Nz = 128
Nz = 16
grid = TripolarGrid(size=(Nx, Ny, Nz), z=(0, 1))
c = CenterField(grid)
cᵢ(λ, φ, z) = exp(-^2 + φ^2) / 200)
set!(c, cᵢ)
heatmap(interior(c, :, :, 1))

produces

Image

I'm not entirely sure what the solution is. The problem is that one has to know that domain the function is defined on / what direction we should apply periodicity.

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

No branches or pull requests

1 participant