Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/readoperator.jl @ 852:510f744d0876 operator_storage_array_of_table
Add some documentation for the file format
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 14 Jan 2022 15:39:56 +0100 |
parents | 91a63b04b1c9 |
children | fe8fe3f01162 |
comparison
equal
deleted
inserted
replaced
850:252e4a64edbb | 852:510f744d0876 |
---|---|
7 export parse_scalar | 7 export parse_scalar |
8 export parse_tuple | 8 export parse_tuple |
9 | 9 |
10 export sbp_operators_path | 10 export sbp_operators_path |
11 | 11 |
12 | |
13 # TODO: Docs for readoperator.jl | |
14 # Parsing as rationals is intentional, allows preserving exactness, which can be lowered using converts or promotions later. | |
15 # Documetning the format: Allows representing rationals as strings | |
16 | 12 |
17 """ | 13 """ |
18 read_stencil_set(fn; filters) | 14 read_stencil_set(fn; filters) |
19 | 15 |
20 Picks out a stencil set from the given toml file based on some key-value | 16 Picks out a stencil set from the given toml file based on some key-value |
26 stencils use the `parse_stencil` functions on the fields of the stencil set. | 22 stencils use the `parse_stencil` functions on the fields of the stencil set. |
27 | 23 |
28 The reason for this is that since stencil sets are intended to be very | 24 The reason for this is that since stencil sets are intended to be very |
29 general, and currently do not include any way to specify how to parse a given | 25 general, and currently do not include any way to specify how to parse a given |
30 section, the exact parsing is left to the user. | 26 section, the exact parsing is left to the user. |
27 | |
28 For more information see [Operator file format](@ref) in the documentation. | |
31 | 29 |
32 See also [`sbp_operators_path`](@ref), [`get_stencil_set`](@ref), [`parse_stencil`](@ref), [`parse_scalar`](@ref), [`parse_tuple`](@ref),. | 30 See also [`sbp_operators_path`](@ref), [`get_stencil_set`](@ref), [`parse_stencil`](@ref), [`parse_scalar`](@ref), [`parse_tuple`](@ref),. |
33 """ | 31 """ |
34 read_stencil_set(fn; filters...) = get_stencil_set(TOML.parsefile(fn); filters...) | 32 read_stencil_set(fn; filters...) = get_stencil_set(TOML.parsefile(fn); filters...) |
35 | 33 |
60 end | 58 end |
61 | 59 |
62 """ | 60 """ |
63 parse_stencil(parsed_toml) | 61 parse_stencil(parsed_toml) |
64 | 62 |
65 Accepts parsed parsed_toml and reads it as a stencil | 63 Accepts parsed parsed_toml and reads it as a stencil. |
66 | 64 |
67 See also [`read_stencil_set`](@ref), [`parse_scalar`](@ref), [`parse_tuple`](@ref). | 65 See also [`read_stencil_set`](@ref), [`parse_scalar`](@ref), [`parse_tuple`](@ref). |
68 """ | 66 """ |
69 function parse_stencil(parsed_toml) | 67 function parse_stencil(parsed_toml) |
70 check_stencil_toml(parsed_toml) | 68 check_stencil_toml(parsed_toml) |