From e4c9228f87ef9e1812abe222182178bf39237515 Mon Sep 17 00:00:00 2001
From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch>
Date: Fri, 29 Apr 2022 18:37:44 +0200
Subject: [PATCH] debug

---
 src/fourier_mod.F90    |  4 ++--
 src/processing_mod.F90 |  8 ++++----
 src/srcinfo.h          |  4 ++--
 src/srcinfo/srcinfo.h  |  4 ++--
 wk/quick_run.m         | 12 ++++++------
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/fourier_mod.F90 b/src/fourier_mod.F90
index 204cb4fa..a64aa501 100644
--- a/src/fourier_mod.F90
+++ b/src/fourier_mod.F90
@@ -84,9 +84,9 @@ MODULE fourier
     ! First term df/dx x dg/dy
     DO ikx = ikxs, ikxe
       DO iky = ikys, ikye
-        cmpx_data_f(ikx,iky-local_nky_offset) = &
+        cmpx_data_f(iky-local_nky_offset,ikx) = &
               imagu*kxarray(ikx)*F_(iky,ikx)*AA_x(ikx)*AA_y(iky) !Anti aliasing filter
-        cmpx_data_g(ikx,iky-local_nky_offset) = &
+        cmpx_data_g(iky-local_nky_offset,ikx) = &
               imagu*kyarray(iky)*G_(iky,ikx)*AA_x(ikx)*AA_y(iky) !Anti aliasing filter
       ENDDO
     ENDDO
diff --git a/src/processing_mod.F90 b/src/processing_mod.F90
index 7ea686e9..84ca47df 100644
--- a/src/processing_mod.F90
+++ b/src/processing_mod.F90
@@ -209,8 +209,8 @@ SUBROUTINE compute_nadiab_moments_z_gradients_and_interp
 !------------- INTERP AND GRADIENTS ALONG Z ----------------------------------
 
   IF (KIN_E) THEN
-  DO iky = ikys,ikye
-    DO ikx = ikxs,ikxe
+  DO ikx = ikxs,ikxe
+    DO iky = ikys,ikye
       DO ij = ijgs_e,ijge_e
         DO ip = ipgs_e,ipge_e
           p_int = parray_e(ip)
@@ -227,8 +227,8 @@ SUBROUTINE compute_nadiab_moments_z_gradients_and_interp
   ENDDO
   ENDIF
 
-  DO iky = ikys,ikye
-    DO ikx = ikxs,ikxe
+  DO ikx = ikxs,ikxe
+    DO iky = ikys,ikye
       DO ij = ijgs_i,ijge_i
         DO ip = ipgs_i,ipge_i
           p_int = parray_i(ip)
diff --git a/src/srcinfo.h b/src/srcinfo.h
index cfd5c044..f4318715 100644
--- a/src/srcinfo.h
+++ b/src/srcinfo.h
@@ -3,8 +3,8 @@ character(len=40) BRANCH
 character(len=20) AUTHOR
 character(len=40) EXECDATE
 character(len=40) HOST
-parameter (VERSION='c4a68c6-dirty')
+parameter (VERSION='b4318b5-dirty')
 parameter (BRANCH='kx_pos_plane')
 parameter (AUTHOR='ahoffman')
-parameter (EXECDATE='Fri Apr 29 17:51:42 CEST 2022')
+parameter (EXECDATE='Fri Apr 29 18:36:06 CEST 2022')
 parameter (HOST ='spcpc606')
diff --git a/src/srcinfo/srcinfo.h b/src/srcinfo/srcinfo.h
index cfd5c044..f4318715 100644
--- a/src/srcinfo/srcinfo.h
+++ b/src/srcinfo/srcinfo.h
@@ -3,8 +3,8 @@ character(len=40) BRANCH
 character(len=20) AUTHOR
 character(len=40) EXECDATE
 character(len=40) HOST
-parameter (VERSION='c4a68c6-dirty')
+parameter (VERSION='b4318b5-dirty')
 parameter (BRANCH='kx_pos_plane')
 parameter (AUTHOR='ahoffman')
-parameter (EXECDATE='Fri Apr 29 17:51:42 CEST 2022')
+parameter (EXECDATE='Fri Apr 29 18:36:06 CEST 2022')
 parameter (HOST ='spcpc606')
diff --git a/wk/quick_run.m b/wk/quick_run.m
index 64400569..f36365d3 100644
--- a/wk/quick_run.m
+++ b/wk/quick_run.m
@@ -7,7 +7,7 @@ RUN = 1; % To run or just to load
 addpath(genpath('../matlab')) % ... add
 default_plots_options
 HELAZDIR = '/home/ahoffman/HeLaZ/';
-EXECNAME = 'helaz3.12';
+EXECNAME = 'helaz3';
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% Set Up parameters
 CLUSTER.TIME  = '99:00:00'; % allocation time hh:mm:ss
@@ -15,8 +15,8 @@ CLUSTER.TIME  = '99:00:00'; % allocation time hh:mm:ss
 %% PHYSICAL PARAMETERS
 NU      = 0.1;   % Collision frequency
 TAU     = 1.0;    % e/i temperature ratio
-K_N     = 1.8;%1.9;%2.22;   % Density gradient drive
-K_T     = 0;%0.25*K_N;   % Temperature '''
+K_N     = 1.9;%2.22;   % Density gradient drive
+K_T     = 0.25*K_N;   % Temperature '''
 K_E     = 0.0;   % Electrostat '''
 SIGMA_E = 0.0233380;   % mass ratio sqrt(m_a/m_i) (correct = 0.0233380)
 KIN_E   = 1;     % 1: kinetic electrons, 2: adiabatic electrons
@@ -49,10 +49,10 @@ SPSCP   = 0;    % Sampling per time unit for checkpoints
 JOB2LOAD= -1;
 %% OPTIONS
 SIMID   = 'quick_run';  % Name of the simulation
-LINEARITY = 'linear';   % activate non-linearity (is cancelled if KXEQ0 = 1)
+LINEARITY = 'nonlinear';   % activate non-linearity (is cancelled if KXEQ0 = 1)
 % Collision operator
 % (LB:L.Bernstein, DG:Dougherty, SG:Sugama, LR: Lorentz, LD: Landau)
-CO      = 'DG';
+CO      = 'SG';
 GKCO    = 1; % gyrokinetic operator
 ABCO    = 1; % interspecies collisions
 INIT_ZF = 0; ZF_AMP = 0.0;
@@ -89,7 +89,7 @@ setup
 system(['rm fort*.90']);
 % Run linear simulation
 if RUN
-    system(['cd ../results/',SIMID,'/',PARAMS,'/; time mpirun -np 1 ',HELAZDIR,'bin/',EXECNAME,' 1 1 1 0; cd ../../../wk'])
+    system(['cd ../results/',SIMID,'/',PARAMS,'/; time mpirun -np 4 ',HELAZDIR,'bin/',EXECNAME,' 1 4 1 0; cd ../../../wk'])
 %     system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 2 ',HELAZDIR,'bin/',EXECNAME,' 2 1 1 0; cd ../../../wk'])
 %     system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 4 ',HELAZDIR,'bin/',EXECNAME,' 1 2 2 0; cd ../../../wk'])
 %     system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 6 ',HELAZDIR,'bin/',EXECNAME,' 1 3 2 0; cd ../../../wk'])
-- 
GitLab