From ccf2889f88bd41a1adc098cc9c59f569df0e7262 Mon Sep 17 00:00:00 2001
From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch>
Date: Tue, 5 Jan 2021 13:36:24 +0100
Subject: [PATCH] interface change

---
 wk/analysis_2D.m   | 12 +++++-------
 wk/marconi_run.m   | 21 ++++++++++++---------
 wk/test_parallel.m | 15 ++++++++-------
 3 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/wk/analysis_2D.m b/wk/analysis_2D.m
index 4e01df31..6a349482 100644
--- a/wk/analysis_2D.m
+++ b/wk/analysis_2D.m
@@ -1,7 +1,7 @@
 %% Load results
-if 0
+if 1
     %%
-    outfile = '/marconi_scratch/userexternal/ahoffman/HeLaZ/results/Marconi/512x256_L_100_Pe_6_Je_3_Pi_6_Ji_3_nB_0.8_nN_1_nu_1e-01_FC_mu_5e-04/out.txt';
+    outfile = '/marconi_scratch/userexternal/ahoffman/HeLaZ/results/Marconi/200x100_L_100_Pe_2_Je_1_Pi_2_Ji_1_nB_0.66_nN_1_nu_1e-01_FC_mu_1e-03/out.txt';
     BASIC.RESDIR = load_marconi(outfile);
 end
 %%
@@ -236,7 +236,7 @@ save_figure
 end
 
 %%
-t0    = 1;
+t0    = 40;
 skip_ = 1; 
 DELAY = 0.01*skip_;
 FRAMES = floor(t0/(Ts2D(2)-Ts2D(1)))+1:skip_:numel(Ts2D);
@@ -264,7 +264,7 @@ create_gif
 end
 if 0
 %% Phi
-GIFNAME = ['phi',sprintf('_%.2d',JOBNUM)];INTERP = 1;
+GIFNAME = ['phi',sprintf('_%.2d',JOBNUM)];INTERP = 0;
 FIELD = real(phi); X = RR; Y = ZZ; T = Ts2D;
 FIELDNAME = '$\phi$'; XNAME = '$r/\rho_s$'; YNAME = '$z/\rho_s$';
 create_gif
@@ -334,7 +334,7 @@ end
 %%
 if 0
 %% Show frame in kspace
-tf = 100; [~,it2] = min(abs(Ts2D-tf)); [~,it5] = min(abs(Ts5D-tf));
+tf = 300; [~,it2] = min(abs(Ts2D-tf)); [~,it5] = min(abs(Ts5D-tf));
 fig = figure; FIGNAME = ['krkz_frame',sprintf('t=%.0f',Ts2D(it2))];set(gcf, 'Position',  [100, 100, 700, 600])
     subplot(221); plt = @(x) fftshift((abs(x)),2);
         pclr = pcolor(fftshift(KR,2),fftshift(KZ,2),plt(PHI(:,:,it2))); set(pclr, 'edgecolor','none'); colorbar;
@@ -345,11 +345,9 @@ fig = figure; FIGNAME = ['krkz_frame',sprintf('t=%.0f',Ts2D(it2))];set(gcf, 'Pos
     subplot(223); plt = @(x) fftshift(abs(x),2);
         pclr = pcolor(fftshift(KR,2),fftshift(KZ,2),plt(Ne00(:,:,it2))); set(pclr, 'edgecolor','none'); colorbar;
         xlabel('$k_r$'); ylabel('$k_z$'); legend('$|\hat n_e^{00}|$');
-if strcmp(OUTPUTS.write_non_lin,'.true.')
     subplot(224); plt = @(x) fftshift((abs(x)),2);
         pclr = pcolor(fftshift(KR,2),fftshift(KZ,2),plt(Si00(:,:,it5))); set(pclr, 'edgecolor','none'); colorbar;
         xlabel('$k_r$'); ylabel('$k_z$');legend('$\hat S_i^{00}$');
-end
 save_figure
 end
 
diff --git a/wk/marconi_run.m b/wk/marconi_run.m
index 3fc57d14..88d87fd4 100644
--- a/wk/marconi_run.m
+++ b/wk/marconi_run.m
@@ -7,7 +7,7 @@ addpath(genpath('../matlab')) % ... add
 CLUSTER.TIME  = '24:00:00'; % allocation time hh:mm:ss
 CLUSTER.NODES = '1';        % MPI process
 CLUSTER.CPUPT = '1';        % CPU per task
-CLUSTER.NTPN  = '20';       % N tasks per node
+CLUSTER.NTPN  = '24';       % N tasks per node
 CLUSTER.PART  = 'prod';     % dbg or prod
 CLUSTER.MEM   = '16GB';     % Memory
 CLUSTER.JNAME = 'gamma_inf';     % Job name
@@ -17,17 +17,15 @@ TAU     = 1.0;    % e/i temperature ratio
 ETAB    = 0.66;    % Magnetic gradient
 ETAN    = 1.0;    % Density gradient
 ETAT    = 0.0;    % Temperature gradient
-MU      = 5e-4;   % Hyper diffusivity coefficient
+HD_CO   = 0.5;    % Hyper diffusivity cutoff ratio
 NOISE0  = 1.0e-5;
 %% GRID PARAMETERS
-N       = 512;     % Frequency gridpoints (Nkr = N/2)
+N       = 200;     % Frequency gridpoints (Nkr = N/2)
 L       = 100;     % Size of the squared frequency domain
-PMAXE   = 8;    % Highest electron Hermite polynomial degree
-JMAXE   = 4;     % Highest ''       Laguerre ''
-PMAXI   = 8;     % Highest ion      Hermite polynomial degree
-JMAXI   = 4;     % Highest ''       Laguerre ''
+P       = 4;       % Electron and Ion highest Hermite polynomial degree
+J       = 2;       % Electron and Ion highest Laguerre polynomial degree
 %% TIME PARAMETERS
-TMAX    = 400;  % Maximal time unit
+TMAX    = 500;  % Maximal time unit
 DT      = 1e-2;   % Time step
 SPS0D   = 10;    % Sampling per time unit for profiler
 SPS2D   = 1;      % Sampling per time unit for 2D arrays
@@ -48,7 +46,12 @@ KREQ0   = 0;      % put kr = 0
 KPAR    = 0.0;    % Parellel wave vector component
 LAMBDAD = 0.0;
 NON_LIN = 1 *(1-KREQ0);   % activate non-linearity (is cancelled if KREQ0 = 1)
-
+PMAXE   = P;    % Highest electron Hermite polynomial degree
+JMAXE   = J;     % Highest ''       Laguerre ''
+PMAXI   = P;     % Highest ion      Hermite polynomial degree
+JMAXI   = J;     % Highest ''       Laguerre ''
+kmax    = N*pi/L;% Highest fourier mode
+MU      = 0.1/(HD_CO*kmax)^4 % Hyperdiffusivity coefficient
 %% Run following scripts
 setup
 
diff --git a/wk/test_parallel.m b/wk/test_parallel.m
index 8ae62788..7346fdd6 100644
--- a/wk/test_parallel.m
+++ b/wk/test_parallel.m
@@ -10,24 +10,24 @@ TAU     = 1.0;    % e/i temperature ratio
 ETAB    = 0.5;    % Magnetic gradient
 ETAN    = 1.0;    % Density gradient
 ETAT    = 0.0;    % Temperature gradient
-MU      = 5e-4;   % Hyper diffusivity coefficient
+HD_CO   = 0.5;    % Hyper diffusivity cutoff ratio
 NOISE0  = 1.0e-5;
 %% GRID PARAMETERS
 N       = 128;     % Frequency gridpoints (Nkr = N/2)
-L       = 33;     % Size of the squared frequency domain
+L       = 66;     % Size of the squared frequency domain
 PMAXE   = 2;     % Highest electron Hermite polynomial degree
 JMAXE   = 1;     % Highest ''       Laguerre ''
 PMAXI   = 2;     % Highest ion      Hermite polynomial degree
 JMAXI   = 1;     % Highest ''       Laguerre ''
 %% TIME PARAMETERS
-TMAX    = 20;  % Maximal time unit
-DT      = 2e-2;   % Time step
+TMAX    = 500;  % Maximal time unit
+DT      = 1e-2;   % Time step
 SPS0D   = 1/DT;    % Sampling per time unit for profiler
 SPS2D   = 2;      % Sampling per time unit for 2D arrays
 SPS5D   = 2;    % Sampling per time unit for 5D arrays
 SPSCP   = 1/10;    % Sampling per time unit for checkpoints
-RESTART = 0;      % To restart from last checkpoint
-JOB2LOAD= 0;
+RESTART = 1;      % To restart from last checkpoint
+JOB2LOAD= 1;
 %% OPTIONS
 SIMID   = 'debug';  % Name of the simulation
 CO      = 0;  % Collision operator (0 : L.Bernstein, -1 : Full Coulomb, -2 : Dougherty)
@@ -41,5 +41,6 @@ KPAR    = 0.0;    % Parellel wave vector component
 LAMBDAD = 0.0;
 NON_LIN = 1 *(1-KREQ0);   % activate non-linearity (is cancelled if KREQ0 = 1)
 LOAD_MARCONI = 0;
-
+kmax    = N*pi/L;% Highest fourier mode
+MU      = 0.1/(HD_CO*kmax)^4 % Hyperdiffusivity coefficient
 setup
-- 
GitLab