Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/volumeops/derivatives/first_derivative.jl @ 1099:05a25a5063bb refactor/sbpoperators/inflation
Try to remove volume_operator and boundary_operator methods
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 21 Mar 2022 12:51:39 +0100 |
parents | 1ba8a398af9c |
children | 157a78959e5d |
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/derivatives/first_derivative.jl Mon Mar 21 10:04:15 2022 +0100 +++ b/src/SbpOperators/volumeops/derivatives/first_derivative.jl Mon Mar 21 12:51:39 2022 +0100 @@ -14,7 +14,9 @@ """ function first_derivative(grid::EquidistantGrid, inner_stencil, closure_stencils, direction) h_inv = inverse_spacing(grid)[direction] - return SbpOperators.volume_operator(grid, scale(inner_stencil,h_inv), scale.(closure_stencils,h_inv), odd, direction) + + D₁ = VolumeOperator(restrict(grid, direction), scale(inner_stencil,h_inv), scale.(closure_stencils,h_inv), odd) + return LazyTensors.inflate(D₁, size(grid), direction) end first_derivative(grid::EquidistantGrid{1}, inner_stencil::Stencil, closure_stencils) = first_derivative(grid,inner_stencil,closure_stencils,1)