changeset 4:ef878a3df87d

Use stencils in D2
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 17 Dec 2018 13:05:16 +0100
parents 19492ab142c3
children 2737156fb884
files sbpD2.jl
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/sbpD2.jl	Mon Dec 17 12:53:00 2018 +0100
+++ b/sbpD2.jl	Mon Dec 17 13:05:16 2018 +0100
@@ -1,8 +1,8 @@
 
 struct D2{T}
     quadratureClosure::Vector{T}
-    innerStencil::Vector{T}
-    closureStencils::Matrix{T}
+    innerStencil::Stencil
+    closureStencils::Vector{Stencil} # TBD: Should this be a tuple?
     eClosure::Vector{T}
     dClosure::Vector{T}
 end
@@ -11,9 +11,9 @@
     return length(quadratureClosure)
 end
 
-struct Stencil
+struct Stencil{T}
     range::NTuple{2,Int}
-    weights::Vector{Float64}
+    weights::Vector{T} # TBD: Should this be a tuple?
     function Stencil(range, weights)
         width = range[2]-range[1]+1
         if width != length(weights)