Mercurial > repos > public > sbplib_julia
comparison diffOp.jl @ 114:d24497780ebd cell_based_test
Add comment about maybe splitting apply_region!
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 08 Feb 2019 23:54:25 +0100 |
parents | 3b89aa6dc7f2 |
children | ff7f377433b4 |
comparison
equal
deleted
inserted
replaced
113:3b89aa6dc7f2 | 114:d24497780ebd |
---|---|
55 apply_region!(D, u, v, Upper, Interior) | 55 apply_region!(D, u, v, Upper, Interior) |
56 apply_region!(D, u, v, Upper, Upper) | 56 apply_region!(D, u, v, Upper, Upper) |
57 return nothing | 57 return nothing |
58 end | 58 end |
59 | 59 |
60 # Maybe this should be split according to b3fbef345810 after all?! Seems like it makes performance more predictable | |
60 function apply_region!(D::DiffOpCartesian{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}) where T | 61 function apply_region!(D::DiffOpCartesian{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}) where T |
61 N = D.grid.numberOfPointsPerDim | 62 N = D.grid.numberOfPointsPerDim |
62 closuresize = closureSize(D.op) | 63 closuresize = closureSize(D.op) |
63 for I ∈ regionindices(N, closuresize, (r1,r2)) | 64 for I ∈ regionindices(N, closuresize, (r1,r2)) |
64 @inbounds indextuple = (Index{r1}(I[1]), Index{r2}(I[2])) | 65 @inbounds indextuple = (Index{r1}(I[1]), Index{r2}(I[2])) |