diff src/SbpOperators/volumeops/quadratures/inverse_quadrature.jl @ 671:e14627e79a54 feature/stencil_convenience

Add stencil constructor for centered stencils and change from tuple to vararg in stencil constructor taking cneter
author Jonatan Werpers <jonatan@werpers.com>
date Sat, 06 Feb 2021 21:42:57 +0100
parents f4a16b403487
children 0bec3c4e78c0
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/quadratures/inverse_quadrature.jl	Sun Jan 31 20:57:58 2021 +0100
+++ b/src/SbpOperators/volumeops/quadratures/inverse_quadrature.jl	Sat Feb 06 21:42:57 2021 +0100
@@ -32,7 +32,7 @@
 the closure stencils are those of the quadrature operator (and not the inverse).
 """
 function InverseDiagonalQuadrature(grid::EquidistantGrid, closure_stencils::NTuple{M,Stencil{T,1}}) where {T,M}
-    inv_inner_stencil = Stencil(Tuple{T}(1),center=1)
+    inv_inner_stencil = Stencil(one(T), center=1)
     inv_closure_stencils = reciprocal_stencil.(closure_stencils)
     return InverseQuadrature(grid, inv_inner_stencil, inv_closure_stencils)
 end