comparison 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
comparison
equal deleted inserted replaced
664:7d7c1d636de3 671:e14627e79a54
30 Creates the inverse of the diagonal quadrature operator defined by the inner stencil 30 Creates the inverse of the diagonal quadrature operator defined by the inner stencil
31 1/h and a set of 1-element closure stencils in `closure_stencils`. Note that 31 1/h and a set of 1-element closure stencils in `closure_stencils`. Note that
32 the closure stencils are those of the quadrature operator (and not the inverse). 32 the closure stencils are those of the quadrature operator (and not the inverse).
33 """ 33 """
34 function InverseDiagonalQuadrature(grid::EquidistantGrid, closure_stencils::NTuple{M,Stencil{T,1}}) where {T,M} 34 function InverseDiagonalQuadrature(grid::EquidistantGrid, closure_stencils::NTuple{M,Stencil{T,1}}) where {T,M}
35 inv_inner_stencil = Stencil(Tuple{T}(1),center=1) 35 inv_inner_stencil = Stencil(one(T), center=1)
36 inv_closure_stencils = reciprocal_stencil.(closure_stencils) 36 inv_closure_stencils = reciprocal_stencil.(closure_stencils)
37 return InverseQuadrature(grid, inv_inner_stencil, inv_closure_stencils) 37 return InverseQuadrature(grid, inv_inner_stencil, inv_closure_stencils)
38 end 38 end
39 export InverseDiagonalQuadrature 39 export InverseDiagonalQuadrature
40 40