Skip to content

(0.94.0) Overhaul spacings functions to return KernelFunctionOperations #3143

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

Merged
merged 61 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
ecf8ea4
fix spacings methods for immersed boundary grids
tomchor Jun 13, 2023
3d3caa1
Update src/ImmersedBoundaries/immersed_grid_metrics.jl
tomchor Jun 14, 2023
6e85d30
Update src/ImmersedBoundaries/immersed_grid_metrics.jl
tomchor Jun 14, 2023
fcc1474
add tests for spacing(s) on IBG
navidcy Jun 15, 2023
b95582d
don't redefine x/y/zspacing methods
navidcy Jun 15, 2023
8ea2b02
Merge branch 'main' into tc/immersed-metrics
tomchor Jul 3, 2023
0961a8d
Merge branch 'main' into tc/immersed-metrics
tomchor Jul 12, 2023
435858e
Merge branch 'main' into tc/immersed-metrics
tomchor Jul 23, 2023
e2b7dd5
Merge branch 'main' into tc/immersed-metrics
tomchor Aug 12, 2023
06e8f70
Merge branch 'main' into tc/immersed-metrics
ali-ramadhan Oct 7, 2024
0e8d685
Merge branch 'main' into tc/immersed-metrics
ali-ramadhan Oct 31, 2024
2a3e87e
Correct merge `main`
ali-ramadhan Oct 31, 2024
438e70e
Disambiguate `yspacings`
ali-ramadhan Oct 31, 2024
1d816fc
Cleanup?
ali-ramadhan Oct 31, 2024
0410e6f
Add `*spacing` functions that rely on `KernelFunctionOperation`s
ali-ramadhan Nov 1, 2024
db35026
Declutter `ImmersedBoundaries` module
ali-ramadhan Nov 5, 2024
0ff460b
Changes needed to fix tests
ali-ramadhan Nov 6, 2024
9f545f8
Fix tests
ali-ramadhan Nov 6, 2024
bcf3562
Bump v0.94.0
ali-ramadhan Nov 6, 2024
51dc034
Merge branch 'main' into tc/immersed-metrics
ali-ramadhan Nov 6, 2024
6fc107a
spacings functions now return a `KernelFunctionOperation`
ali-ramadhan Nov 6, 2024
304c68a
Merge branch 'tc/immersed-metrics' of github.com:CliMA/Oceananigans.j…
ali-ramadhan Nov 6, 2024
7ce022e
Address some review comments and fix OSSG tests
ali-ramadhan Nov 7, 2024
4dd10b6
Address more review comments, update and fix tests
ali-ramadhan Nov 7, 2024
680d535
Merge branch 'main' into tc/immersed-metrics
ali-ramadhan Nov 8, 2024
00fb688
Merge branch 'main' into tc/immersed-metrics
ali-ramadhan Nov 8, 2024
bf2ed33
Fix more tests
ali-ramadhan Nov 8, 2024
1131ef4
Merge branch 'main' into tc/immersed-metrics
ali-ramadhan Nov 8, 2024
b9dd039
Fix bug in Makie ext
glwagner Nov 8, 2024
3e057cc
Update src/Grids/rectilinear_grid.jl
ali-ramadhan Nov 8, 2024
a271519
Update src/Grids/latitude_longitude_grid.jl
ali-ramadhan Nov 8, 2024
bbab356
Update src/Grids/orthogonal_spherical_shell_grid.jl
ali-ramadhan Nov 8, 2024
8dd6c87
Update src/Grids/orthogonal_spherical_shell_grid.jl
ali-ramadhan Nov 8, 2024
b66cc3c
Update src/Grids/orthogonal_spherical_shell_grid.jl
ali-ramadhan Nov 8, 2024
9f0c854
Use correct locations for OSSG spacings functions
ali-ramadhan Nov 8, 2024
ea7757b
Simpler `scatterlines` plotting for vertical grid spacing
ali-ramadhan Nov 8, 2024
d7374f9
Forgot to use `first`
ali-ramadhan Nov 8, 2024
5bcc9fc
Merge branch 'main' into tc/immersed-metrics
ali-ramadhan Nov 11, 2024
7e8b553
Define spacing functions for `::Nothing` using superscript `ᵃ`
ali-ramadhan Nov 11, 2024
7fef957
Define methods only once
ali-ramadhan Nov 11, 2024
c1a5ade
Update some tests
ali-ramadhan Nov 11, 2024
5074ce0
Need to define more spacing functions for `RectilinearGrid`
ali-ramadhan Nov 11, 2024
c748494
Also define `:ᵃ` derivative operators
ali-ramadhan Nov 11, 2024
000473f
Need to export some derivatives
ali-ramadhan Nov 11, 2024
bbe6967
Also use `:ᵃ` for immersed grid metrics.
ali-ramadhan Nov 11, 2024
3a29990
Update vertical grid plotting in ocean wind mixing example
ali-ramadhan Nov 11, 2024
735a16f
Trying to define the complete set without duplicates
ali-ramadhan Nov 11, 2024
e00c419
Revert "Trying to define the complete set without duplicates"
ali-ramadhan Nov 12, 2024
35f047a
Revert "Also use `:ᵃ` for immersed grid metrics."
ali-ramadhan Nov 12, 2024
90a6b36
Revert "Need to export some derivatives"
ali-ramadhan Nov 12, 2024
6800fd7
Revert "Also define `:ᵃ` derivative operators"
ali-ramadhan Nov 12, 2024
2e5e3d6
Let's try this again
ali-ramadhan Nov 12, 2024
2b38f5f
Merge branch 'main' into tc/immersed-metrics
ali-ramadhan Nov 12, 2024
37b4975
Reorganize and define some specialized spacings
ali-ramadhan Nov 12, 2024
0a0222d
Some more spacings
ali-ramadhan Nov 12, 2024
cd3369a
Fix doctests
ali-ramadhan Nov 13, 2024
0e37314
Fix docs
ali-ramadhan Nov 13, 2024
85483e5
Fix plotting examples in docs
ali-ramadhan Nov 13, 2024
3bdef8b
Merge branch 'main' into tc/immersed-metrics
tomchor Nov 14, 2024
ddfd789
Merge branch 'main' into tc/immersed-metrics
tomchor Nov 14, 2024
7c8f9a4
Merge branch 'main' into tc/immersed-metrics
glwagner Nov 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Grids/latitude_longitude_grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ end
view(grid.Δyᶠᶜᵃ, interior_indices(ℓy, topology(grid, 2)(), grid.Ny))

@inline yspacings(grid::YRegLatLonGrid, ℓx, ℓy; with_halos=false) = yspacings(grid, ℓy; with_halos)
@inline yspacings(grid, ℓy::Center; kwargs...) = grid.Δyᶠᶜᵃ
@inline yspacings(grid, ℓy::Face; kwargs...) = grid.Δyᶜᶠᵃ
@inline yspacings(grid::LatLonGrid, ℓy::Center; kwargs...) = grid.Δyᶠᶜᵃ
@inline yspacings(grid::LatLonGrid, ℓy::Face; kwargs...) = grid.Δyᶜᶠᵃ

@inline zspacings(grid::LatLonGrid, ℓz::Center; with_halos=false) = with_halos ? grid.Δzᵃᵃᶜ : view(grid.Δzᵃᵃᶜ, interior_indices(ℓz, topology(grid, 3)(), size(grid, 3)))
@inline zspacings(grid::ZRegLatLonGrid, ℓz::Center; with_halos=false) = grid.Δzᵃᵃᶜ
Expand Down
15 changes: 11 additions & 4 deletions src/ImmersedBoundaries/immersed_grid_metrics.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Oceananigans.AbstractOperations: GridMetricOperation

import Oceananigans.Grids: return_metrics
import Oceananigans.Grids: return_metrics,
xspacing, yspacing, zspacing,
xspacings, yspacings, zspacings

const c = Center()
const f = Face()
Expand Down Expand Up @@ -34,6 +36,11 @@ end
@inline Δzᵃᵃᶠ(i, j, k, ibg::IBG) = Δzᵃᵃᶠ(i, j, k, ibg.underlying_grid)

return_metrics(grid::IBG) = return_metrics(grid.underlying_grid)
xspacings(X, grid::IBG) = xspacings(X, grid.underlying_grid)
yspacings(Y, grid::IBG) = yspacings(Y, grid.underlying_grid)
zspacings(Z, grid::IBG) = zspacings(Z, grid.underlying_grid)

xspacing(grid::IBG, args...) = xspacing(grid.underlying_grid, args...)
yspacing(grid::IBG, args...) = yspacing(grid.underlying_grid, args...)
zspacing(grid::IBG, args...) = zspacing(grid.underlying_grid, args...)

xspacings(grid::IBG, args...) = xspacings(grid.underlying_grid, args...)
yspacings(grid::IBG, args...) = yspacings(grid.underlying_grid, args...)
zspacings(grid::IBG, args...) = zspacings(grid.underlying_grid, args...)