comparison src/SbpOperators/readoperator.jl @ 853:fe8fe3f01162 operator_storage_array_of_table

Docs touch up
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 17 Jan 2022 08:34:06 +0100
parents 510f744d0876
children 439a5e6c7175
comparison
equal deleted inserted replaced
852:510f744d0876 853:fe8fe3f01162
13 """ 13 """
14 read_stencil_set(fn; filters) 14 read_stencil_set(fn; filters)
15 15
16 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
17 filters. If more than one set matches the filters an error is raised. The 17 filters. If more than one set matches the filters an error is raised. The
18 stencil set contains parsed toml intended for functions like `parse_scalar` 18 returned stencil set contains parsed toml intended for functions like
19 and `parse_stencil`. 19 `parse_scalar` and `parse_stencil`.
20 20
21 The stencil set is not parsed beyond the inital toml parse. To get usable 21 The stencil set is not parsed beyond the inital toml parse. To get usable
22 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.
23 23
24 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
58 end 58 end
59 59
60 """ 60 """
61 parse_stencil(parsed_toml) 61 parse_stencil(parsed_toml)
62 62
63 Accepts parsed parsed_toml and reads it as a stencil. 63 Accepts parsed toml and reads it as a stencil.
64 64
65 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).
66 """ 66 """
67 function parse_stencil(parsed_toml) 67 function parse_stencil(parsed_toml)
68 check_stencil_toml(parsed_toml) 68 check_stencil_toml(parsed_toml)
77 end 77 end
78 78
79 """ 79 """
80 parse_stencil(T, parsed_toml) 80 parse_stencil(T, parsed_toml)
81 81
82 Parses the stencil with element type `T` 82 Parses the input as a stencil with element type `T`.
83 """ 83 """
84 parse_stencil(T, parsed_toml) = Stencil{T}(parse_stencil(parsed_toml)) 84 parse_stencil(T, parsed_toml) = Stencil{T}(parse_stencil(parsed_toml))
85 85
86 function check_stencil_toml(parsed_toml) 86 function check_stencil_toml(parsed_toml)
87 if !(parsed_toml isa Dict || parsed_toml isa Vector{String}) 87 if !(parsed_toml isa Dict || parsed_toml isa Vector{String})
121 end 121 end
122 122
123 """ 123 """
124 parse_tuple(parsed_toml) 124 parse_tuple(parsed_toml)
125 125
126 Parse `parsed_toml` as a tuple of scalars. 126 Parse an array as a tuple of scalars.
127 127
128 See also [`read_stencil_set`](@ref), [`parse_stencil`](@ref), [`parse_scalar`](@ref). 128 See also [`read_stencil_set`](@ref), [`parse_stencil`](@ref), [`parse_scalar`](@ref).
129 """ 129 """
130 function parse_tuple(parsed_toml) 130 function parse_tuple(parsed_toml)
131 if !(parsed_toml isa Array) 131 if !(parsed_toml isa Array)