Skip to content

Commit

Permalink
Add interpolation for fields on ImmersedBoundaryGrids (#3524)
Browse files Browse the repository at this point in the history
* bugfix

* extend methods

---------

Co-authored-by: Navid C. Constantinou <[email protected]>
  • Loading branch information
simone-silvestri and navidcy committed Apr 2, 2024
1 parent ff3ab99 commit c0222cd
Showing 1 changed file with 6 additions and 1 deletion.
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

0 comments on commit c0222cd

Please sign in to comment.