Mercurial > repos > public > sbplib_julia
diff stencil.jl @ 93:93df72e2b135 stencil_index
Implement apply for 2D-Laplace which takes an StencilIndex as input
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Mon, 04 Feb 2019 09:13:48 +0100 |
parents | 8d505e9bc715 |
children | 84b1ad5a3755 |
line wrap: on
line diff
--- a/stencil.jl Mon Feb 04 09:11:53 2019 +0100 +++ b/stencil.jl Mon Feb 04 09:13:48 2019 +0100 @@ -19,6 +19,7 @@ Base.@propagate_inbounds function apply(s::Stencil, v::AbstractVector, i::Int) w = zero(eltype(v)) + @show s.range[1]:s.range[2] for j ∈ s.range[1]:s.range[2] @inbounds weight = s[j] w += weight*v[i+j]