diff src/SbpOperators/readoperator.jl @ 828:ca182cbb8f49 operator_storage_array_of_table

Add a method to parse_stencil which allows controlling the element type
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 12 Jan 2022 08:39:48 +0100
parents 219c9661e700
children 21ab60cc0a5c
line wrap: on
line diff
--- a/src/SbpOperators/readoperator.jl	Wed Jan 12 07:45:38 2022 +0100
+++ b/src/SbpOperators/readoperator.jl	Wed Jan 12 08:39:48 2022 +0100
@@ -85,6 +85,8 @@
     return Stencil(weights..., center = toml["c"])
 end
 
+parse_stencil(T, toml) = Stencil{T}(parse_stencil(toml))
+
 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."))