diff src/SbpOperators/volumeops/derivatives/second_derivative_variable.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
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/derivatives/second_derivative_variable.jl	Mon Mar 02 14:11:32 2026 +0100
+++ b/src/SbpOperators/volumeops/derivatives/second_derivative_variable.jl	Mon Mar 02 14:21:58 2026 +0100
@@ -11,7 +11,7 @@
 
 function second_derivative_variable(g::TensorGrid, coeff, stencil_set, dim::Int)
     if dim ∉ 1:ndims(g)
-        throw(DomainError(dim, "Direction must be inside [0, $(ndims(g))]."))
+        throw(DomainError(dim, "Derivative direction must be in 1:$(ndims(g))."))
     end
     inner_stencil    = parse_nested_stencil(eltype(coeff), stencil_set["D2variable"]["inner_stencil"])
     closure_stencils = parse_nested_stencil.(eltype(coeff), stencil_set["D2variable"]["closure_stencils"])