diff src/SbpOperators/boundaryops/boundary_restriction.jl @ 1100:157a78959e5d refactor/sbpoperators/inflation

Bring up to date
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 10 May 2022 20:34:20 +0200
parents 05a25a5063bb 7fc8df5157a7
children c0ab81e4c39c
line wrap: on
line diff
--- a/src/SbpOperators/boundaryops/boundary_restriction.jl	Mon Mar 21 12:51:39 2022 +0100
+++ b/src/SbpOperators/boundaryops/boundary_restriction.jl	Tue May 10 20:34:20 2022 +0200
@@ -1,6 +1,3 @@
-# TODO: The type parameter closure_stencil::Stencil is required since there isnt any suitable type
-# for stencil_set. We should consider adding type ::StencilSet and dispatch on that instead.
-# The same goes for other operators
 """
     boundary_restriction(grid, closure_stencil::Stencil, boundary)
 
@@ -13,7 +10,7 @@
 
 See also: [`boundary_operator`](@ref).
 """
-function boundary_restriction(grid, closure_stencil::Stencil, boundary)
+function boundary_restriction(grid, closure_stencil, boundary)
     converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil)
 
     op = BoundaryOperator(restrict(grid, dim(boundary)), converted_stencil, region(boundary))
@@ -23,7 +20,6 @@
 """
     boundary_restriction(grid, stencil_set, boundary)
 
-Creates a `boundary_restriction` operator on `grid` given a parsed TOML
-`stencil_set`.
+Creates a `boundary_restriction` operator on `grid` given a `stencil_set`.
 """
-boundary_restriction(grid, stencil_set, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary)
+boundary_restriction(grid, stencil_set::StencilSet, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary)