comparison diffOp.jl @ 152:f54dd4408fa7 boundary_conditions

Merge with default
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 15 Apr 2019 16:15:04 +0200
parents e0c8f5cf3a3f c6aaf061c0a9
children 754c36796ac8
comparison
equal deleted inserted replaced
145:e0c8f5cf3a3f 152:f54dd4408fa7
80 end 80 end
81 81
82 using TiledIteration 82 using TiledIteration
83 function apply_region_tiled!(D::DiffOpCartesian{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}) where T 83 function apply_region_tiled!(D::DiffOpCartesian{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}) where T
84 ri = regionindices(D.grid.size, closureSize(D.op), (r1,r2)) 84 ri = regionindices(D.grid.size, closureSize(D.op), (r1,r2))
85 for tileaxs ∈ TileIterator(axes(ri), padded_tilesize(T, (5,5), 2)) # TBD: Is this the right way, the right size? 85 # TODO: Pass Tilesize to function
86 for tileaxs ∈ TileIterator(axes(ri), padded_tilesize(T, (5,5), 2))
86 for j ∈ tileaxs[2], i ∈ tileaxs[1] 87 for j ∈ tileaxs[2], i ∈ tileaxs[1]
87 I = ri[i,j] 88 I = ri[i,j]
88 u[i,j] = apply(D, v, (Index{r1}(I[1]), Index{r2}(I[2]))) 89 u[I] = apply(D, v, (Index{r1}(I[1]), Index{r2}(I[2])))
89 end 90 end
90 end 91 end
91 return nothing 92 return nothing
92 end 93 end
93 94