From 9ec08b0e77f9b53de7a5b1464317ba09c09855f4 Mon Sep 17 00:00:00 2001
From: Stephan Hilb <stephan@ecshi.net>
Date: Sat, 10 Sep 2022 18:24:29 +0200
Subject: [PATCH] add doc for divergence

---
 src/common.jl | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/common.jl b/src/common.jl
index e7233c3..8144a3d 100644
--- a/src/common.jl
+++ b/src/common.jl
@@ -76,6 +76,16 @@ end
     end
 end
 
+"""
+    divergence(w::StaticKernels.Window)
+
+Kernel function to compute the divergence of a vector field.
+The window is expected to have eltype either:
+  - `SVector{N,T}` and `N` dimensions or
+  - `SMatrix{M,N,T}` and `N` dimensions.
+"""
+function divergence end
+
 @generated function divergence(w::StaticKernels.Window{SVector{N,T},N}) where {N,T}
     i0 = ntuple(_->0, N)
     i1(k) = ntuple(i->Int(k==i), N)
-- 
GitLab