Mercurial > repos > public > sbplib_julia
comparison diffOp.jl @ 110:ee071b8ed58c cell_based_test
Use deafult constructor for Index in apply!
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 08 Feb 2019 15:27:48 +0100 |
parents | b3fbef345810 |
children | 18b86c33b35a |
comparison
equal
deleted
inserted
replaced
109:b3fbef345810 | 110:ee071b8ed58c |
---|---|
64 return nothing | 64 return nothing |
65 end | 65 end |
66 | 66 |
67 @inline function apply!(D::DiffOpCartesian{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}, ri::CartesianIndices{2}) where T | 67 @inline function apply!(D::DiffOpCartesian{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}, ri::CartesianIndices{2}) where T |
68 for I ∈ ri | 68 for I ∈ ri |
69 @inbounds indextuple = (Index(I[1], r1), Index(I[2], r2)) | 69 @inbounds indextuple = (Index{r1}(I[1]), Index{r2}(I[2])) |
70 @inbounds u[I] = apply(D, v, indextuple) | 70 @inbounds u[I] = apply(D, v, indextuple) |
71 end | 71 end |
72 return nothing | 72 return nothing |
73 end | 73 end |
74 | 74 |