Skip to content

Commit a343989

Browse files
committed
Remove generic definitions of vectorplot! etc.
They introduced dispatching ambiguities. Missing methods will throw an error anyway.
1 parent ed37476 commit a343989

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "GridVisualize"
22
uuid = "5eed8a63-0fb0-45eb-886d-8d5a387d12b8"
33
authors = ["Juergen Fuhrmann <[email protected]>", "Patrick Jaap <[email protected]>"]
4-
version = "1.15.3"
4+
version = "1.15.4"
55

66
[deps]
77
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"

src/dispatch.jl

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,6 @@ $(_myprint(default_plot_kwargs()))
408408
available_kwargs() = println(_myprint(default_plot_kwargs()))
409409

410410
###################################################################################
411-
function gridplot!(ctx, ::Type{T}, ::Type{Val{D}}, grid) where {T <: AbstractPlotterType, D}
412-
error("Missing implementation of gridplot!(ctx,::Type{$(T)}, ::Type{Val{$D}}, grid)")
413-
end
414411

415412
"""
416413
$(TYPEDSIGNATURES)
@@ -511,10 +508,6 @@ function gridplot(
511508
end
512509

513510
###################################################################################
514-
function scalarplot!(ctx, ::Type{T}, ::Type{Val{D}}, grids, parentgrid, funcs) where {T <: AbstractPlotterType, D}
515-
error("Missing implementation of scalarplot!(ctx,::Type{$(T)}, ::Type{Val{$D}}, grids, parentgrid, funcs)")
516-
end
517-
518511

519512
"""
520513
$(TYPEDSIGNATURES)
@@ -712,10 +705,6 @@ function scalarplot(
712705
end
713706

714707
###################################################################################
715-
function vectorplot!(ctx, ::Type{T}, ::Type{Val{D}}, grid, func) where {T <: AbstractPlotterType, D}
716-
error("Missing implementation of vectorplot!(ctx,::Type{$(T)}, ::Type{Val{$D}}, grids, grid,func)")
717-
end
718-
719708

720709
"""
721710
$(TYPEDSIGNATURES)
@@ -730,10 +719,10 @@ function vectorplot!(ctx::SubVisualizer, grid::ExtendableGrid, func; kwargs...)
730719
return vectorplot!(ctx, plottertype(ctx[:Plotter]), Val{dim_space(grid)}, grid, func)
731720
end
732721

733-
function vectorplot!(ctx, ptype, ::Type{Val{1}}, grid, func::Matrix)
722+
function vectorplot!(ctx, ptype::Type{T}, ::Type{Val{1}}, grid, func::Matrix) where {T <: AbstractPlotterType}
734723
return scalarplot!(ctx, ptype, Val{1}, [grid], grid, [func[1, :]])
735724
end
736-
function vectorplot!(ctx, ptype, ::Type{Val{1}}, grid, func::Vector)
725+
function vectorplot!(ctx, ptype::Type{T}, ::Type{Val{1}}, grid, func::Vector) where {T <: AbstractPlotterType}
737726
return scalarplot!(ctx, ptype, Val{1}, [grid], grid, [func])
738727
end
739728

@@ -807,10 +796,6 @@ function vectorplot(
807796
end
808797

809798
###################################################################################
810-
function streamplot!(ctx, ::Type{T}, ::Type{Val{D}}, grid, func) where {T <: AbstractPlotterType, D}
811-
error("Missing implementation of streamplot!(ctx,::Type{$(T)}, ::Type{Val{$D}}, grids, grid,func)")
812-
end
813-
814799

815800
"""
816801
$(TYPEDSIGNATURES)

0 commit comments

Comments
 (0)