Mercurial > repos > public > sbplib_julia
diff SbpOperators/src/stencil.jl @ 291:0f94dc29c4bf
Merge in branch boundary_conditions
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 22 Jun 2020 21:43:05 +0200 |
parents | ccef055233a2 |
children |
line wrap: on
line diff
--- a/SbpOperators/src/stencil.jl Wed Jun 26 15:07:47 2019 +0200 +++ b/SbpOperators/src/stencil.jl Mon Jun 22 21:43:05 2020 +0200 @@ -21,7 +21,7 @@ return s.weights[1 + i - s.range[1]] end -Base.@propagate_inbounds @inline function apply(s::Stencil{T,N}, v::AbstractVector, i::Int) where {T,N} +Base.@propagate_inbounds @inline function apply_stencil(s::Stencil{T,N}, v::AbstractVector, i::Int) where {T,N} w = s.weights[1]*v[i + s.range[1]] @simd for k ∈ 2:N w += s.weights[k]*v[i + s.range[1] + k-1] @@ -29,7 +29,7 @@ return w end -Base.@propagate_inbounds @inline function apply_backwards(s::Stencil{T,N}, v::AbstractVector, i::Int) where {T,N} +Base.@propagate_inbounds @inline function apply_stencil_backwards(s::Stencil{T,N}, v::AbstractVector, i::Int) where {T,N} w = s.weights[N]*v[i - s.range[2]] @simd for k ∈ N-1:-1:1 w += s.weights[k]*v[i - s.range[1] - k + 1]