Mercurial > repos > public > sbplib_julia
changeset 1763:65fd5331caa5 feature/jet_aqua
Fix more ambiguities
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 13 Sep 2024 16:03:06 +0200 |
parents | 164e26a6cf79 |
children | d207e1abacc1 |
files | src/SbpOperators/stencil.jl src/SbpOperators/volumeops/constant_interior_scaling_operator.jl |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
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}
--- a/src/SbpOperators/volumeops/constant_interior_scaling_operator.jl Fri Sep 13 15:46:28 2024 +0200 +++ b/src/SbpOperators/volumeops/constant_interior_scaling_operator.jl Fri Sep 13 16:03:06 2024 +0200 @@ -19,7 +19,7 @@ end end -function ConstantInteriorScalingOperator(grid::EquidistantGrid, interior_weight, closure_weights) +function ConstantInteriorScalingOperator(grid::EquidistantGrid, interior_weight::T, closure_weights::NTuple{N,T} where N) where T return ConstantInteriorScalingOperator(interior_weight, Tuple(closure_weights), size(grid)[1]) end