Mercurial > repos > public > sbplib_julia
changeset 1759:d28562d5ca8f feature/jet_aqua
Remove unbound parameter for Stencil
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 13 Sep 2024 14:01:37 +0200 |
parents | d8fabe814d06 |
children | aba2ce166546 |
files | src/SbpOperators/stencil.jl |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/SbpOperators/stencil.jl Fri Sep 13 13:33:17 2024 +0200 +++ b/src/SbpOperators/stencil.jl Fri Sep 13 14:01:37 2024 +0200 @@ -5,14 +5,16 @@ range::UnitRange{Int64} weights::NTuple{N,T} - function Stencil(range::UnitRange,weights::NTuple{N,T}) where {T, N} + function Stencil(range::UnitRange,weights::NTuple{N,Any}) where N + T = eltype(weights) + @assert length(range) == N new{T,N}(range,weights) end end """ - Stencil(weights::NTuple; center::Int) + Stencil(weights...; center::Int) Create a stencil with the given weights with element `center` as the center of the stencil. """