Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/stencil.jl @ 1763:65fd5331caa5 feature/jet_aqua
Fix more ambiguities
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 13 Sep 2024 16:03:06 +0200 |
parents | d28562d5ca8f |
children | 244311761969 |
line wrap: on
line diff
--- a/src/SbpOperators/stencil.jl Fri Sep 13 15:46:28 2024 +0200 +++ b/src/SbpOperators/stencil.jl Fri Sep 13 16:03:06 2024 +0200 @@ -114,6 +114,9 @@ s::Stencil{Stencil{T,N},M} end +NestedStencil(;center) = NestedStencil(Stencil(;center)) +CenteredNestedStencil() = NestedStencil(CenteredStencil()) + # Stencil input NestedStencil(s::Vararg{Stencil}; center) = NestedStencil(Stencil(s... ; center)) CenteredNestedStencil(s::Vararg{Stencil}) = NestedStencil(CenteredStencil(s...)) @@ -141,7 +144,7 @@ function Base.convert(::Type{NestedStencil{T,N,M}}, s::NestedStencil{S,N,M}) where {T,S,N,M} return NestedStencil{T,N,M}(s) end -Base.convert(::Type{NestedStencil{T}}, stencil) where T = NestedStencil{T}(stencil) +Base.convert(::Type{NestedStencil{T}}, stencil::NestedStencil) where T = NestedStencil{T}(stencil) function Base.promote_rule(::Type{NestedStencil{T,N,M}}, ::Type{NestedStencil{S,N,M}}) where {T,S,N,M} return NestedStencil{promote_type(T,S),N,M}