From 5cc6fc25ce9280e253a152b4d1ac72b47584fce8 Mon Sep 17 00:00:00 2001
From: Antoine Hoffmann <antoine.hoffmann@epfl.ch>
Date: Tue, 11 Oct 2022 13:40:13 +0200
Subject: [PATCH] computation of kp_max for warning message was missing

---
 src/collision_mod.F90 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/collision_mod.F90 b/src/collision_mod.F90
index da2009fb..edef40d9 100644
--- a/src/collision_mod.F90
+++ b/src/collision_mod.F90
@@ -693,6 +693,7 @@ CONTAINS
       CALL allocate_array(kp_grid_mat, 1,nkp_mat)
       CALL getarr(fid, '/coordkperp', kp_grid_mat)
 
+      kp_max = SQRT(kx_max**2+ky_max**2)
       ! check that we have enough kperps mat
       IF (LINEARITY .NE. 'linear') THEN
         IF ( (kp_grid_mat(nkp_mat) .LT. 2./3.*kp_max) .AND. (my_id .EQ. 0)) WRITE(*,*) '!! Matrix kperp grid too small !!'
-- 
GitLab