Skip to content

Commit

Permalink
remove form here
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-silvestri committed Dec 15, 2024
1 parent ff08e9f commit d42d299
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CubedSphere = "7445602f-e544-4518-8976-18f8e8ae6cdb"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
FFMPEG = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
Expand Down
14 changes: 0 additions & 14 deletions src/Coriolis/hydrostatic_spherical_coriolis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,6 @@ Adapt.adapt_structure(to, coriolis::HydrostaticSphericalCoriolis) =

const CoriolisActiveCellEnstrophyConserving = HydrostaticSphericalCoriolis{<:ActiveCellEnstrophyConserving}

@inline not_peripheral_node(args...) = !peripheral_node(args...)

@inline function mask_inactive_points_ℑxyᶠᶜᵃ(i, j, k, grid, f::Function, args...)
neighboring_active_nodes = ℑxyᶠᶜᵃ(i, j, k, grid, not_peripheral_node, Center(), Face(), Center())
return ifelse(neighboring_active_nodes == 0, zero(grid),
ℑxyᶠᶜᵃ(i, j, k, grid, f, args...) / neighboring_active_nodes)
end

@inline function mask_inactive_points_ℑxyᶜᶠᵃ(i, j, k, grid, f::Function, args...)
neighboring_active_nodes = @inbounds ℑxyᶜᶠᵃ(i, j, k, grid, not_peripheral_node, Face(), Center(), Center())
return ifelse(neighboring_active_nodes == 0, zero(grid),
ℑxyᶜᶠᵃ(i, j, k, grid, f, args...) / neighboring_active_nodes)
end

@inline x_f_cross_U(i, j, k, grid, coriolis::CoriolisActiveCellEnstrophyConserving, U) =
@inbounds - ℑyᵃᶜᵃ(i, j, k, grid, fᶠᶠᵃ, coriolis) *
mask_inactive_points_ℑxyᶠᶜᵃ(i, j, k, grid, Δx_qᶜᶠᶜ, U[2]) / Δxᶠᶜᶜ(i, j, k, grid)
Expand Down

0 comments on commit d42d299

Please sign in to comment.