diff SbpOperators/src/stencil.jl @ 269:ccef055233a2 boundary_conditions

Move general methods for D2 to ConstantStencilOperator and increase verbosity of method names for clarity
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 05 Dec 2019 10:48:31 +0100
parents 69a6049e14d9
children
line wrap: on
line diff
--- a/SbpOperators/src/stencil.jl	Thu Dec 05 09:44:34 2019 +0100
+++ b/SbpOperators/src/stencil.jl	Thu Dec 05 10:48:31 2019 +0100
@@ -21,7 +21,7 @@
     return s.weights[1 + i - s.range[1]]
 end
 
-Base.@propagate_inbounds @inline function apply(s::Stencil{T,N}, v::AbstractVector, i::Int) where {T,N}
+Base.@propagate_inbounds @inline function apply_stencil(s::Stencil{T,N}, v::AbstractVector, i::Int) where {T,N}
     w = s.weights[1]*v[i + s.range[1]]
     @simd for k ∈ 2:N
         w += s.weights[k]*v[i + s.range[1] + k-1]
@@ -29,7 +29,7 @@
     return w
 end
 
-Base.@propagate_inbounds @inline function apply_backwards(s::Stencil{T,N}, v::AbstractVector, i::Int) where {T,N}
+Base.@propagate_inbounds @inline function apply_stencil_backwards(s::Stencil{T,N}, v::AbstractVector, i::Int) where {T,N}
     w = s.weights[N]*v[i - s.range[2]]
     @simd for k ∈ N-1:-1:1
         w += s.weights[k]*v[i - s.range[1] - k + 1]