Mercurial > repos > public > sbplib_julia
comparison diffOp.jl @ 106:8010aadc4ff1 cell_based_test
Clean up in Laplace 2d apply!
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 08 Feb 2019 10:59:01 +0100 |
parents | 44cd6b4371de |
children | e3e32299fe72 |
comparison
equal
deleted
inserted
replaced
105:44cd6b4371de | 106:8010aadc4ff1 |
---|---|
78 end | 78 end |
79 | 79 |
80 function apply!(L::Laplace{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}) where T | 80 function apply!(L::Laplace{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}) where T |
81 N = L.grid.numberOfPointsPerDim | 81 N = L.grid.numberOfPointsPerDim |
82 closuresize = closureSize(L.op) | 82 closuresize = closureSize(L.op) |
83 regionTuple = (r1,r2) | 83 for I ∈ regionindices(N, closuresize, (r1,r2)) |
84 for I ∈ regionindices(N, closuresize, regionTuple) | |
85 @inbounds indextuple = (Index(I[1], r1), Index(I[2], r2)) | 84 @inbounds indextuple = (Index(I[1], r1), Index(I[2], r2)) |
86 @inbounds u[I] = apply(L, v, indextuple) | 85 @inbounds u[I] = apply(L, v, indextuple) |
87 end | 86 end |
88 return nothing | 87 return nothing |
89 end | 88 end |