comparison src/SbpOperators/stencil_set.jl @ 1596:84dc3b9b449b feature/boundary_conditions

Add positivity properties (the borrowing capacity) of the D2 operators to the operator toml as well as methods to parse them
author Vidar Stiernström <vidar.stiernstrom@gmail.com>
date Sun, 26 May 2024 18:13:58 -0700
parents d7bc11053951
children 8315c456e3b4
comparison
equal deleted inserted replaced
1595:611ae2308aa1 1596:84dc3b9b449b
164 throw(ArgumentError("argument must be an array")) 164 throw(ArgumentError("argument must be an array"))
165 end 165 end
166 return Tuple(parse_scalar.(parsed_toml)) 166 return Tuple(parse_scalar.(parsed_toml))
167 end 167 end
168 168
169 """
170 parse_named_tuple(parsed_toml)
171
172 Parse the keys (names) and values (scalars) into a named tuple of rationals.
173
174 See also [`parse_scalar`](@ref).
175 """
176 function parse_named_tuple(parsed_toml)
177 NamedTuple(Symbol(key) => parse_scalar(val) for (key, val) in parsed_toml)
178 end
179
169 180
170 """ 181 """
171 parse_rational(parsed_toml) 182 parse_rational(parsed_toml)
172 183
173 Parse a string or a number as a rational. 184 Parse a string or a number as a rational.