diff sbpD2.jl @ 122:6c6979ff17f4 cell_based_test

Introduce and use apply_backwards for stencils
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 12 Feb 2019 15:18:18 +0100
parents 19031733bbbf
children 1aaeb46ba5f4
line wrap: on
line diff
--- a/sbpD2.jl	Sun Feb 10 19:16:14 2019 +0100
+++ b/sbpD2.jl	Tue Feb 12 15:18:18 2019 +0100
@@ -11,7 +11,7 @@
 
 @inline function apply(op::ConstantStencilOperator, h::Real, v::AbstractVector, i::Index{Upper})
     N = length(v)
-    return @inbounds Int(op.parity)*apply(flip(op.closureStencils[N-Int(i)+1]), v, Int(i))/h^2
+    return @inbounds Int(op.parity)*apply_backwards(op.closureStencils[N-Int(i)+1], v, Int(i))/h^2
 end
 
 @inline function apply(op::ConstantStencilOperator, h::Real, v::AbstractVector, index::Index{Unknown})