Mercurial > repos > public > sbplib_julia
comparison diffOp.jl @ 111:18b86c33b35a cell_based_test
Backed out changeset b3fbef345810, splitting apply! just complicates things
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 08 Feb 2019 20:56:13 +0100 |
parents | ee071b8ed58c |
children | 98c788cba9bf |
comparison
equal
deleted
inserted
replaced
110:ee071b8ed58c | 111:18b86c33b35a |
---|---|
55 apply!(D, u, v, Upper, Interior) | 55 apply!(D, u, v, Upper, Interior) |
56 apply!(D, u, v, Upper, Upper) | 56 apply!(D, u, v, Upper, Upper) |
57 return nothing | 57 return nothing |
58 end | 58 end |
59 | 59 |
60 @inline function apply!(D::DiffOpCartesian{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}) where T | 60 function apply!(D::DiffOpCartesian{2}, u::AbstractArray{T,2}, v::AbstractArray{T,2}, r1::Type{<:Region}, r2::Type{<:Region}) where T |
61 N = D.grid.numberOfPointsPerDim | 61 N = D.grid.numberOfPointsPerDim |
62 closuresize = closureSize(D.op) | 62 closuresize = closureSize(D.op) |
63 apply!(D, u, v, r1, r2, regionindices(N, closuresize, (r1,r2))) | 63 for I ∈ regionindices(N, closuresize, (r1,r2)) |
64 return nothing | |
65 end | |
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 | |
68 for I ∈ ri | |
69 @inbounds indextuple = (Index{r1}(I[1]), Index{r2}(I[2])) | 64 @inbounds indextuple = (Index{r1}(I[1]), Index{r2}(I[2])) |
70 @inbounds u[I] = apply(D, v, indextuple) | 65 @inbounds u[I] = apply(D, v, indextuple) |
71 end | 66 end |
72 return nothing | 67 return nothing |
73 end | 68 end |