From 3d1a9a1caccb45197b3bdc08e7a2c872f442caa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20K=C3=B6hler?= <27728103+Ceyron@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:13:49 +0200 Subject: [PATCH] Fix missing factor of 0.5 --- exponax/nonlin_fun/_convection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exponax/nonlin_fun/_convection.py b/exponax/nonlin_fun/_convection.py index 39f4aca..732b173 100644 --- a/exponax/nonlin_fun/_convection.py +++ b/exponax/nonlin_fun/_convection.py @@ -131,7 +131,7 @@ def _multi_channel_conservative_eval( u = self.ifft(u_hat_dealiased) u_outer_product = u[None, :] * u[:, None] u_outer_product_hat = self.fft(u_outer_product) - convection = jnp.sum( + convection = 0.5 * jnp.sum( self.derivative_operator[None, :] * u_outer_product_hat, axis=1, )