From 03a6473f44ea3fd40e6fb4b07f74753816574c71 Mon Sep 17 00:00:00 2001
From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch>
Date: Mon, 22 Feb 2021 11:11:28 +0100
Subject: [PATCH] scripts update

---
 matlab/load_marconi.m |  2 +-
 matlab/setup.m        |  2 --
 wk/analysis_2D.m      |  5 +++--
 wk/linear_study.m     | 14 +++++++++-----
 wk/marconi_run.m      |  4 ++--
 5 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/matlab/load_marconi.m b/matlab/load_marconi.m
index f8374af5..9540a049 100644
--- a/matlab/load_marconi.m
+++ b/matlab/load_marconi.m
@@ -2,7 +2,7 @@ function [ RESDIR ] = load_marconi( outfilename )
 %UNTITLED2 Summary of this function goes here
 %   Detailed explanation goes here
     hostfolder  = outfilename(1:end-8);
-    hostfile    = [hostfolder,'/outputs*'];
+    hostfile    = [hostfolder,'/out*'];
     RESDIR      = ['../',outfilename(46:end-8),'/'];
     localfolder = [RESDIR,'.'];
     CMD = ['scp -r ahoffman@login.marconi.cineca.it:',hostfile,' ',localfolder];
diff --git a/matlab/setup.m b/matlab/setup.m
index ed77bc65..6460fe51 100644
--- a/matlab/setup.m
+++ b/matlab/setup.m
@@ -5,8 +5,6 @@ GRID.pmaxe = PMAXE;  % Electron Hermite moments
 GRID.jmaxe = JMAXE;  % Electron Laguerre moments
 GRID.pmaxi = PMAXI;  % Ion Hermite moments
 GRID.jmaxi = JMAXI;  % Ion Laguerre moments
-GRID.p_damp = P_DAMP;  % Ion Laguerre moments
-GRID.j_damp = J_DAMP;  % Ion Laguerre moments
 GRID.Nr    = N; % r grid resolution
 GRID.Lr    = L; % r length
 GRID.Nz    = N * (1-KREQ0) + KREQ0; % z ''
diff --git a/wk/analysis_2D.m b/wk/analysis_2D.m
index 65ed6764..7ecc2771 100644
--- a/wk/analysis_2D.m
+++ b/wk/analysis_2D.m
@@ -1,8 +1,9 @@
 %% Load results
-if 0
+if 1
     %%
     outfile ='';
-    outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/Marconi_restart/150x75_L_70_P_2_J_1_eta_0.6_nu_1e+00_DGGK_CLOS_0_mu_8e-04/out.txt';
+    outfile ='';
+    outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/Marconi_DGGK_eta_0.6_nu_1e+00/150x75_L_70_P_10_J_5_eta_0.6_nu_1e+00_DGGK_CLOS_0_mu_8e-04/out.txt';
 
     BASIC.RESDIR = load_marconi(outfile);
 end
diff --git a/wk/linear_study.m b/wk/linear_study.m
index 6643ab27..51d8c938 100644
--- a/wk/linear_study.m
+++ b/wk/linear_study.m
@@ -10,15 +10,15 @@ TAU     = 1.0;    % e/i temperature ratio
 ETAB    = 0.6;
 ETAN    = 1.0;    % Density gradient
 ETAT    = 0.0;    % Temperature gradient
-NU_HYP  = 1.0;   % Hyperdiffusivity coefficient
+NU_HYP  = 0.1;   % Hyperdiffusivity coefficient
 LAMBDAD = 0.0;
 NOISE0  = 1.0e-5;
 %% GRID PARAMETERS
 N       = 150;     % Frequency gridpoints (Nkr = N/2)
 L       = 70;     % Size of the squared frequency domain
 KREQ0   = 1;      % put kr = 0
-P_DAMP  = 0;     % Hermite damping term  -(j/Jmax)^{2*r}Napj (0: no damping, 1: r=1, 2: r=2 etc...)
-J_DAMP  = 0;     % Laguerre damping term -(j/Jmax)^{2*r}Napj (0: no damping, 1: r=1, 2: r=2 etc...)
+MU_P    = 0.0;     % Hermite  hyperdiffusivity -mu_p*(d/dvpar)^4 f
+MU_J    = 0.0;     % Laguerre hyperdiffusivity -mu_j*(d/dvperp)^4 f
 %% TIME PARMETERS
 TMAX    = 100;  % Maximal time unit
 DT      = 1e-2;   % Time step
@@ -29,10 +29,10 @@ SPSCP   = 0;    % Sampling per time unit for checkpoints
 RESTART = 0;      % To restart from last checkpoint
 JOB2LOAD= 00;
 %% OPTIONS
-SIMID   = 'linear_study';  % Name of the simulation
+SIMID   = 'linear_study_test_mu_kin';  % Name of the simulation
 NON_LIN = 0 *(1-KREQ0);   % activate non-linearity (is cancelled if KREQ0 = 1)
 CO      = -3;  % Collision operator (0 : L.Bernstein, -1 : Full Coulomb, -2 : Dougherty)
-CLOS    = 2;   % Closure model (0: =0 truncation, 1: semi coll, 2: Copy closure J+1 = J, P+2 = P)
+CLOS    = 0;   % Closure model (0: =0 truncation, 1: semi coll, 2: Copy closure J+1 = J, P+2 = P)
 KERN    = 0;   % Kernel model (0 : GK)
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -51,6 +51,8 @@ if 1
 PA = [2, 3, 4, 6, 8, 10];
 JA = [1, 2, 2, 3, 4,  5];
 DTA= DT./sqrt(JA);
+mup_ = MU_P;
+muj_ = MU_J;
 % PA = [4];
 % JA = [2];
 Nparam = numel(PA);
@@ -64,6 +66,8 @@ for i = 1:Nparam
     PMAXE = PA(i); PMAXI = PA(i);
     JMAXE = JA(i); JMAXI = JA(i);
     DT = DTA(i);
+    MU_P = mup_/PMAXE^2;
+    MU_J = muj_/JMAXE^3;
     setup
     % Run linear simulation
     system(...
diff --git a/wk/marconi_run.m b/wk/marconi_run.m
index d7cbb642..646ea136 100644
--- a/wk/marconi_run.m
+++ b/wk/marconi_run.m
@@ -4,7 +4,7 @@ addpath(genpath('../matlab')) % ... add
 %% Set Up parameters
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% CLUSTER PARAMETERS
-CLUSTER.TIME  = '03:00:00'; % allocation time hh:mm:ss
+CLUSTER.TIME  = '12:00:00'; % allocation time hh:mm:ss
 CLUSTER.NODES = '1';        % MPI process
 CLUSTER.CPUPT = '1';        % CPU per task
 CLUSTER.NTPN  = '24';       % N tasks per node
@@ -30,7 +30,7 @@ SPS0D   = 1;      % Sampling per time unit for profiler
 SPS2D   = 1/2;   % Sampling per time unit for 2D arrays
 SPS5D   = 1/10;  % Sampling per time unit for 5D arrays
 SPSCP   = 1/10;  % Sampling per time unit for checkpoints
-RESTART = 0;     % To restart from last checkpoint
+RESTART = 1;     % To restart from last checkpoint
 JOB2LOAD= 0;
 %% OPTIONS
 % SIMID   = 'Marconi_DGGK_nu_%0.0e';  % Name of the simulation
-- 
GitLab