Mercurial > repos > public > sbplib_julia
diff sbpD2.jl @ 85:8d505e9bc715 cell_based_test
Merge with default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 25 Jan 2019 15:26:47 +0100 |
parents | b795ec7f9ca0 48079bd39969 |
children | c0f33eccd527 8324c82c2dfb |
line wrap: on
line diff
--- a/sbpD2.jl Thu Jan 24 17:46:57 2019 +0100 +++ b/sbpD2.jl Fri Jan 25 15:26:47 2019 +0100 @@ -20,10 +20,10 @@ even = 1 end -struct D2{T} <: ConstantStencilOperator +struct D2{T,N,M,K} <: ConstantStencilOperator quadratureClosure::Vector{T} - innerStencil::Stencil{T} - closureStencils::Vector{Stencil{T}} # TBD: Should this be a tuple? + innerStencil::Stencil{T,N} + closureStencils::NTuple{M, Stencil{T,K}} eClosure::Vector{T} dClosure::Vector{T} parity::Parity @@ -42,7 +42,7 @@ width = length(innerStencilWeights) r = (-div(width,2), div(width,2)) - innerStencil = Stencil(r, innerStencilWeights) + innerStencil = Stencil(r, Tuple(innerStencilWeights)) # Create boundary stencils boundarySize = length(d["boundary_stencils"]) @@ -52,7 +52,7 @@ stencilWeights = stringToVector(Float64, d["boundary_stencils"][i]) width = length(stencilWeights) r = (1-i,width-i) - push!(closureStencils,Stencil(r, stencilWeights)) + closureStencils = (closureStencils..., Stencil(r, Tuple(stencilWeights))) end d2 = D2(