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

Add interpolation for fields on ImmersedBoundaryGrids #3524

Merged
merged 9 commits into from
Apr 2, 2024
7 changes: 6 additions & 1 deletion src/ImmersedBoundaries/ImmersedBoundaries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ import Oceananigans.TurbulenceClosures:
νᶠᶜᶠ,
z_bottom

import Oceananigans.Fields: fractional_x_index, fractional_y_index, fractional_z_index

"""
abstract type AbstractImmersedBoundary

Expand Down Expand Up @@ -235,7 +237,6 @@ As well as
@inline immersed_inactive_node(i, j, k, ibg::IBG, LX, LY, LZ) = inactive_node(i, j, k, ibg, LX, LY, LZ) &
!inactive_node(i, j, k, ibg.underlying_grid, LX, LY, LZ)


#####
##### Utilities
#####
Expand Down Expand Up @@ -279,6 +280,10 @@ end

isrectilinear(ibg::IBG) = isrectilinear(ibg.underlying_grid)

@inline fractional_x_index(x, locs, grid::ImmersedBoundaryGrid) = fractional_x_index(x, locs, grid.underlying_grid)
@inline fractional_y_index(x, locs, grid::ImmersedBoundaryGrid) = fractional_y_index(x, locs, grid.underlying_grid)
@inline fractional_z_index(x, locs, grid::ImmersedBoundaryGrid) = fractional_z_index(x, locs, grid.underlying_grid)

#####
##### Diffusivities (for VerticallyImplicit)
##### (the diffusivities on the immersed boundaries are kept)
Expand Down