Mercurial > repos > public > sbplib_julia
changeset 801:04e549669b10 operator_storage_array_of_table
Consider feedback
;)
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 25 Jul 2021 16:12:24 +0200 |
parents | f91495f23604 |
children | f0532b9289b7 |
files | src/SbpOperators/readoperator.jl |
diffstat | 1 files changed, 0 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/src/SbpOperators/readoperator.jl Sun Jul 25 15:39:29 2021 +0200 +++ b/src/SbpOperators/readoperator.jl Sun Jul 25 16:12:24 2021 +0200 @@ -78,29 +78,6 @@ return Stencil(weights..., center = toml["c"]) end -# TBD Vidar: -# I suggest the following restructure, for a clearer control flow. -# function check_stencil_toml(toml) -# if toml isa Vector{String} -# return -# end -# -# if toml isa Dict -# if !(haskey(toml, "s") && haskey(toml, "c")) -# throw(ArgumentError("the table form of a stencil must have fields `s` and `c`.")) -# end -# -# if !(toml["s"] isa Vector{String}) -# throw(ArgumentError("a stencil must be specified as a vector of strings.")) -# end -# -# if !(toml["c"] isa Int) -# throw(ArgumentError("the center of a stencil must be specified as an integer.")) -# end -# return -# end -# throw(ArgumentError("the TOML for a stencil must be a vector of strings or a table.")) -# end function check_stencil_toml(toml) if !(toml isa Dict || toml isa Vector{String}) throw(ArgumentError("the TOML for a stencil must be a vector of strings or a table."))