Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/readoperator.jl @ 655:ec7490fb4404 operator_storage_array_of_table
Start sketching the toml format and needed functions
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 24 Jan 2021 22:15:16 +0100 |
parents | 4a81812150f4 |
children | d34b515b0ae7 |
line wrap: on
line diff
--- a/src/SbpOperators/readoperator.jl Sun Jan 24 21:54:42 2021 +0100 +++ b/src/SbpOperators/readoperator.jl Sun Jan 24 22:15:16 2021 +0100 @@ -47,6 +47,18 @@ return d2 end +""" + read_stencil_set(fn, filter_pairs::Vararg{Pair}) + +Picks out a stencil set from the given toml file based on some filters. +If more than one set matches the filters an error is raised. + +""" +read_stencil_set(fn, filter_pairs::Vararg{Pair}) = get_stencil_set(TOML.parsefile(fn), filter_pairs...) + +function get_stencil_set(parsed_toml, filter_pairs::Vararg{Pair}) + +end """ read_stencil(fn, path...; [center]) @@ -133,6 +145,9 @@ return t end +function get_rationals() +end + # TODO: Probably should be deleted once we have gotten rid of read_D2_operator() function toml_string_array_to_tuple(::Type{T}, arr::AbstractVector{String}) where T return Tuple(T.(parse_rational.(arr)))