diff src/SbpOperators/laplace/secondderivative.jl @ 542:011ca1639153 refactor/tensor_index_coupling

Remove Index{Unknown} and replace with general Any implementations
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 27 Nov 2020 11:27:37 +0100
parents dacbcba33d7d
children 1a53eb83ed24
line wrap: on
line diff
--- a/src/SbpOperators/laplace/secondderivative.jl	Thu Nov 26 21:35:34 2020 +0100
+++ b/src/SbpOperators/laplace/secondderivative.jl	Fri Nov 27 11:27:37 2020 +0100
@@ -38,10 +38,10 @@
     return @inbounds D2.h_inv*D2.h_inv*apply_stencil_backwards(D2.closureStencils[N-Int(I)+1], v, Int(I))
 end
 
-function LazyTensors.apply(D2::SecondDerivative{T}, v::AbstractVector{T}, index::Index{Unknown}) where T
+function LazyTensors.apply(D2::SecondDerivative{T}, v::AbstractVector{T}, i) where T
     N = length(v)  # TODO: Use domain_size here instead?
-    r = getregion(Int(index), closuresize(D2), N)
-    I = Index(Int(index), r)
+    r = getregion(i, closuresize(D2), N)
+    I = Index(i, r)
     return LazyTensors.apply(D2, v, I)
 end