Skip to content

Commit

Permalink
Fix dispatching
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Jul 1, 2022
1 parent 84ee617 commit 717f452
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Spaces/Spaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ include("triangulation.jl")
include("dss.jl")

horizontal_space(space::ExtrudedFiniteDifferenceSpace) = space.horizontal_space
horizontal_space(space::AbstractSpace) = space.topology
horizontal_space(space::AbstractSpace) = space

end # module
22 changes: 10 additions & 12 deletions src/Spaces/dss.jl
Original file line number Diff line number Diff line change
Expand Up @@ -697,19 +697,23 @@ weighted_dss_start!(data, space, ghost_buffer) =
weighted_dss_start!(
data,
space::ExtrudedFiniteDifferenceSpace{S, H},
hspace::H,
hspace,
ghost_buffer,
) where {S, H <: SpectralElementSpace2D{<:DistributedTopology2D}} =
_weighted_dss_start!(data, space, hspace, ghost_buffer)

weighted_dss_start!(
data,
space::H,
hspace::H,
hspace,
ghost_buffer,
) where {H <: SpectralElementSpace2D{<:DistributedTopology2D}} =
_weighted_dss_start!(data, space, hspace, ghost_buffer)

function weighted_dss_start!(data, space, hspace, ghost_buffer)
return nothing
end

function _weighted_dss_start!(data, space, hspace, ghost_buffer)
topology = hspace.topology
if ghost_buffer isa GhostBuffer
Expand All @@ -721,10 +725,6 @@ function _weighted_dss_start!(data, space, hspace, ghost_buffer)
return nothing
end

function weighted_dss_start!(data, space, hspace, ghost_buffer)
return nothing
end

"""
weighted_dss_internal!(data, space, ghost_buffer)
Expand Down Expand Up @@ -766,24 +766,22 @@ weighted_dss_ghost!(data, space, ghost_buffer) =
function weighted_dss_ghost!(
data,
space::ExtrudedFiniteDifferenceSpace{S, H},
hspace::H,
hspace,
ghost_buffer,
) where {S, H <: SpectralElementSpace2D{<:DistributedTopology2D}}
_weighted_dss_ghost!(data, space, hspace, hspace, ghost_buffer)
_weighted_dss_ghost!(data, space, hspace, ghost_buffer)
end

function weighted_dss_ghost!(
data,
space::H,
hspace::H,
hspace,
ghost_buffer,
) where {H <: SpectralElementSpace2D{<:DistributedTopology2D}}
_weighted_dss_ghost!(data, space, hspace, hspace, ghost_buffer)
_weighted_dss_ghost!(data, space, hspace, ghost_buffer)
end

function _weighted_dss_ghost!(data, space, hspace, ghost_buffer)
hspace =
space isa ExtrudedFiniteDifferenceSpace ? space.horizontal_space : space
topology = hspace.topology
local_geometry = local_geometry_data(space)
local_weights = hspace.local_dss_weights
Expand Down

0 comments on commit 717f452

Please sign in to comment.