diff test/SbpOperators/volumeops/derivatives/dissipation_test.jl @ 1679:529b533a1dbb feature/sbp_operators/laplace_curvilinear

Merge feature/sbp_operators/laplace_curvilinear
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 30 Jun 2024 10:57:05 +0200
parents 8e28cadfefb3
children 471a948cd2b2
line wrap: on
line diff
--- a/test/SbpOperators/volumeops/derivatives/dissipation_test.jl	Fri Jun 28 21:40:19 2024 +0200
+++ b/test/SbpOperators/volumeops/derivatives/dissipation_test.jl	Sun Jun 30 10:57:05 2024 +0200
@@ -13,20 +13,9 @@
 using Sbplib.SbpOperators: dissipation_lower_closure_stencils,dissipation_upper_closure_stencils
 using Sbplib.SbpOperators: dissipation_transpose_lower_closure_stencils, dissipation_transpose_upper_closure_stencils
 
-"""
-    monomial(x,k)
-
-Evaluates ``x^k/k!` with the convetion that it is ``0`` for all ``k<0``.
-Has the property that ``d/dx monomial(x,k) = monomial(x,k-1)``
-"""
-function monomial(x,k)
-    if k < 0
-        return zero(x)
-    end
-    x^k/factorial(k)
-end
 
 @testset "undivided_skewed04" begin
+    monomial(x,k) = k < 0 ? zero(x) : x^k/factorial(k)
     g = equidistant_grid(0., 11., 20)
     D,Dáµ€ = undivided_skewed04(g, 1)