comparison src/SbpOperators/readoperator.jl @ 675:1ce3a104afc8 feature/boundary_quads

Merge in default
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 07 Feb 2021 21:28:53 +0100
parents e14627e79a54
children fdd48f6ace1c
comparison
equal deleted inserted replaced
670:538ccbaeb1f8 675:1ce3a104afc8
24 closureStencils = Vector{typeof(innerStencil)}() # TBD: is the the right way to get the correct type? 24 closureStencils = Vector{typeof(innerStencil)}() # TBD: is the the right way to get the correct type?
25 for i ∈ 1:boundarySize 25 for i ∈ 1:boundarySize
26 closureStencils = (closureStencils..., get_stencil(operators, "D2", "closure_stencils", i; center=i)) 26 closureStencils = (closureStencils..., get_stencil(operators, "D2", "closure_stencils", i; center=i))
27 end 27 end
28 # TODO: Get rid of the padding here. Any padding should be handled by the consturctor accepting the stencils. 28 # TODO: Get rid of the padding here. Any padding should be handled by the consturctor accepting the stencils.
29 eClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, e["closure"]), boundarySize), center=1) 29 eClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, e["closure"]), boundarySize)..., center=1)
30 dClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, d1["closure"]), boundarySize), center=1) 30 dClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, d1["closure"]), boundarySize)..., center=1)
31 31
32 q_tuple = pad_tuple(toml_string_array_to_tuple(Float64, H["closure"]), boundarySize) 32 q_tuple = pad_tuple(toml_string_array_to_tuple(Float64, H["closure"]), boundarySize)
33 quadratureClosure = Vector{typeof(innerStencil)}() 33 quadratureClosure = Vector{typeof(innerStencil)}()
34 for i ∈ 1:boundarySize 34 for i ∈ 1:boundarySize
35 quadratureClosure = (quadratureClosure..., Stencil((q_tuple[i],), center=1)) 35 quadratureClosure = (quadratureClosure..., Stencil(q_tuple[i], center=1))
36 end 36 end
37 37
38 d2 = SbpOperators.D2( 38 d2 = SbpOperators.D2(
39 innerStencil, 39 innerStencil,
40 closureStencils, 40 closureStencils,
97 97
98 if isnothing(center) 98 if isnothing(center)
99 center = div(width,2)+1 99 center = div(width,2)+1
100 end 100 end
101 101
102 return Stencil(Tuple(stencil_weights), center=center) 102 return Stencil(stencil_weights..., center=center)
103 end 103 end
104 104
105 """ 105 """
106 get_stencils(parsed_toml, path...; centers) 106 get_stencils(parsed_toml, path...; centers)
107 107