changeset 68:d485da6e3a77 cell_based_test

Make D2 more type stable
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 17 Jan 2019 16:04:07 +0100
parents 7fd4e7a1cd38
children e4fa13137d12
files sbpD2.jl
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/sbpD2.jl	Thu Jan 17 15:52:25 2019 +0100
+++ b/sbpD2.jl	Thu Jan 17 16:04:07 2019 +0100
@@ -22,8 +22,8 @@
 
 struct D2{T} <: ConstantStencilOperator
     quadratureClosure::Vector{T}
-    innerStencil::Stencil
-    closureStencils::Vector{Stencil} # TBD: Should this be a tuple?
+    innerStencil::Stencil{T}
+    closureStencils::Vector{Stencil{T}} # TBD: Should this be a tuple?
     eClosure::Vector{T}
     dClosure::Vector{T}
     parity::Parity
@@ -46,7 +46,7 @@
 
     # Create boundary stencils
     boundarySize = length(d["boundary_stencils"])
-    closureStencils = Vector{Stencil}()
+    closureStencils = Vector{typeof(innerStencil)}() # TBD: is the the right way to get the correct type?
 
     for i ∈ 1:boundarySize
         stencilWeights = stringToVector(Float64, d["boundary_stencils"][i])