diff src/SbpOperators/readoperator.jl @ 895:d24b331547f3 feature/variable_derivatives

Add method for controlling the element type when parsing nested stencils
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 10 Feb 2022 11:08:39 +0100
parents 06c510d40ebb
children
line wrap: on
line diff
--- a/src/SbpOperators/readoperator.jl	Thu Feb 10 10:57:00 2022 +0100
+++ b/src/SbpOperators/readoperator.jl	Thu Feb 10 11:08:39 2022 +0100
@@ -111,7 +111,9 @@
 """
     parse_nested_stencil(parsed_toml)
 
+Accept parsed TOML and read it as a nested tuple.
 
+See also [`read_stencil_set`](@ref), [`parse_stencil`](@ref).
 """
 function parse_nested_stencil(parsed_toml)
     if parsed_toml isa Array
@@ -124,6 +126,12 @@
     return NestedStencil(weights...; center)
 end
 
+"""
+    parse_nested_stencil(T, parsed_toml)
+
+Parse the input as a nested stencil with element type `T`.
+"""
+parse_nested_stencil(T, parsed_toml) = NestedStencil{T}(parse_nested_stencil(parsed_toml))
 
 
 """