Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/readoperator.jl @ 637:4a81812150f4 feature/volume_and_boundary_operators
Change qudrature closure from tuple of reals to tuple of Stencils. Also remove parametrization of stencil width in D2 since this was illformed for the 2nd order case.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Sun, 03 Jan 2021 18:15:14 +0100 |
parents | 7975143118e8 |
children | ec7490fb4404 e14627e79a54 |
line wrap: on
line diff
--- a/src/SbpOperators/readoperator.jl Fri Jan 01 16:45:48 2021 +0100 +++ b/src/SbpOperators/readoperator.jl Sun Jan 03 18:15:14 2021 +0100 @@ -9,7 +9,6 @@ export get_stencils export get_tuple - function read_D2_operator(fn; order) operators = TOML.parsefile(fn)["order$order"] D2 = operators["D2"] @@ -23,22 +22,25 @@ # Create boundary stencils boundarySize = length(D2["closure_stencils"]) closureStencils = Vector{typeof(innerStencil)}() # TBD: is the the right way to get the correct type? - for i ∈ 1:boundarySize closureStencils = (closureStencils..., get_stencil(operators, "D2", "closure_stencils", i; center=i)) end - # TODO: Get rid of the padding here. Any padding should be handled by the consturctor accepting the stencils. - quadratureClosure = pad_tuple(toml_string_array_to_tuple(Float64, H["closure"]), boundarySize) eClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, e["closure"]), boundarySize), center=1) dClosure = Stencil(pad_tuple(toml_string_array_to_tuple(Float64, d1["closure"]), boundarySize), center=1) + q_tuple = pad_tuple(toml_string_array_to_tuple(Float64, H["closure"]), boundarySize) + quadratureClosure = Vector{typeof(innerStencil)}() + for i ∈ 1:boundarySize + quadratureClosure = (quadratureClosure..., Stencil((q_tuple[i],), center=1)) + end + d2 = SbpOperators.D2( - quadratureClosure, innerStencil, closureStencils, eClosure, dClosure, + quadratureClosure, even )