Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/derivatives/second_derivative.jl @ 2090:67d8fbbb9e58 refactor/sbp_operators/direction_check
Update error messages
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Mon, 02 Mar 2026 14:21:58 +0100 |
| parents | 1bc63fa55145 |
| children | e21c295fb2da |
comparison
equal
deleted
inserted
replaced
| 2089:1bc63fa55145 | 2090:67d8fbbb9e58 |
|---|---|
| 9 | 9 |
| 10 See also: [`VolumeOperator`](@ref), [`LazyTensors.inflate`](@ref). | 10 See also: [`VolumeOperator`](@ref), [`LazyTensors.inflate`](@ref). |
| 11 """ | 11 """ |
| 12 function second_derivative(g::TensorGrid, stencil_set, dim) | 12 function second_derivative(g::TensorGrid, stencil_set, dim) |
| 13 if dim ∉ 1:ndims(g) | 13 if dim ∉ 1:ndims(g) |
| 14 throw(DomainError(dim, "Direction must be inside [0, $(ndims(g))].")) | 14 throw(DomainError(dim, "Derivative direction must be in 1:$(ndims(g)).")) |
| 15 end | 15 end |
| 16 D₂ = second_derivative(g.grids[dim], stencil_set) | 16 D₂ = second_derivative(g.grids[dim], stencil_set) |
| 17 return LazyTensors.inflate(D₂, size(g), dim) | 17 return LazyTensors.inflate(D₂, size(g), dim) |
| 18 end | 18 end |
| 19 | 19 |
