comparison src/SbpOperators/readoperator.jl @ 765:fdd48f6ace1c operator_storage_array_of_table

Merge in default
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 07 Feb 2021 21:32:21 +0100
parents d34b515b0ae7 e14627e79a54
children 7624a1350ece
comparison
equal deleted inserted replaced
764:d34b515b0ae7 765:fdd48f6ace1c
27 closureStencils = Vector{typeof(innerStencil)}() # TBD: is the the right way to get the correct type? 27 closureStencils = Vector{typeof(innerStencil)}() # TBD: is the the right way to get the correct type?
28 for i ∈ 1:boundarySize 28 for i ∈ 1:boundarySize
29 closureStencils = (closureStencils..., get_stencil(operators, "D2", "closure_stencils", i; center=i)) 29 closureStencils = (closureStencils..., get_stencil(operators, "D2", "closure_stencils", i; center=i))
30 end 30 end
31 # TODO: Get rid of the padding here. Any padding should be handled by the consturctor accepting the stencils. 31 # TODO: Get rid of the padding here. Any padding should be handled by the consturctor accepting the stencils.
32 eClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, e["closure"]), boundarySize), center=1) 32 eClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, e["closure"]), boundarySize)..., center=1)
33 dClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, d1["closure"]), boundarySize), center=1) 33 dClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, d1["closure"]), boundarySize)..., center=1)
34 34
35 q_tuple = pad_tuple(toml_string_array_to_tuple(Float64, H["closure"]), boundarySize) 35 q_tuple = pad_tuple(toml_string_array_to_tuple(Float64, H["closure"]), boundarySize)
36 quadratureClosure = Vector{typeof(innerStencil)}() 36 quadratureClosure = Vector{typeof(innerStencil)}()
37 for i ∈ 1:boundarySize 37 for i ∈ 1:boundarySize
38 quadratureClosure = (quadratureClosure..., Stencil((q_tuple[i],), center=1)) 38 quadratureClosure = (quadratureClosure..., Stencil(q_tuple[i], center=1))
39 end 39 end
40 40
41 d2 = SbpOperators.D2( 41 d2 = SbpOperators.D2(
42 innerStencil, 42 innerStencil,
43 closureStencils, 43 closureStencils,
134 134
135 if isnothing(center) 135 if isnothing(center)
136 center = div(width,2)+1 136 center = div(width,2)+1
137 end 137 end
138 138
139 return Stencil(Tuple(stencil_weights), center=center) 139 return Stencil(stencil_weights..., center=center)
140 end 140 end
141 141
142 """ 142 """
143 get_stencils(parsed_toml, path...; centers) 143 get_stencils(parsed_toml, path...; centers)
144 144