From d1b82f9414b6a79e7030b1ac1411fa45b8918c09 Mon Sep 17 00:00:00 2001 From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch> Date: Tue, 12 Jan 2021 15:47:39 +0100 Subject: [PATCH] update matlab scripts --- matlab/load_params.m | 4 +++- matlab/write_fort90.m | 1 + wk/analysis_2D.m | 4 ++-- wk/debug_script.m | 19 +++++++++---------- wk/marconi_run.m | 8 ++++---- wk/setup.m | 1 + 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/matlab/load_params.m b/matlab/load_params.m index 41b51696..bec47edf 100644 --- a/matlab/load_params.m +++ b/matlab/load_params.m @@ -3,8 +3,10 @@ if CONAME == -1 CONAME = 'FC'; elseif CONAME == 0 CONAME = 'LB'; -elseif CONAME == 1 +elseif CONAME == -2 CONAME = 'DG'; +elseif CONAME == -3 + CONAME = 'DGGK'; end ETAB = h5readatt(filename,'/data/input','eta_B'); ETAN = h5readatt(filename,'/data/input','eta_n'); diff --git a/matlab/write_fort90.m b/matlab/write_fort90.m index b73460d9..23c331ca 100644 --- a/matlab/write_fort90.m +++ b/matlab/write_fort90.m @@ -7,6 +7,7 @@ fprintf(fid,'&BASIC\n'); fprintf(fid,[' nrun = ', num2str(BASIC.nrun),'\n']); fprintf(fid,[' dt = ', num2str(BASIC.dt),'\n']); fprintf(fid,[' tmax = ', num2str(BASIC.tmax),'\n']); +fprintf(fid,[' RESTART = ', BASIC.RESTART,'\n']); fprintf(fid,[' maxruntime = ', num2str(BASIC.maxruntime),'\n']); fprintf(fid,'/\n'); diff --git a/wk/analysis_2D.m b/wk/analysis_2D.m index 4d5757cd..de32193d 100644 --- a/wk/analysis_2D.m +++ b/wk/analysis_2D.m @@ -3,8 +3,8 @@ if 0 %% outfile =''; outfile =''; - outfile =''; - outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/Marconi/200x100_L_100_Pe_2_Je_1_Pi_2_Ji_1_nB_0.4_nN_1_nu_1e-01_FC_mu_1e-03/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'; +% outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/Marconi/200x100_L_100_Pe_8_Je_4_Pi_8_Ji_4_nB_0.66_nN_1_nu_1e-01_FC_mu_1e-04/out.txt'; BASIC.RESDIR = load_marconi(outfile); end %% diff --git a/wk/debug_script.m b/wk/debug_script.m index ea5d3cae..7c614b01 100644 --- a/wk/debug_script.m +++ b/wk/debug_script.m @@ -1,11 +1,10 @@ -clear all; addpath(genpath('../matlab')) % ... add %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Set Up parameters CLUSTER.TIME = '24:00:00'; % allocation time hh:mm:ss %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% PHYSICAL PARAMETERS -NU = 1e1; % Collision frequency +NU = 1e+1; % Collision frequency TAU = 1.0; % e/i temperature ratio ETAB = 0.5; % Magnetic gradient ETAN = 1.0; % Density gradient @@ -15,22 +14,22 @@ NU_HYP = 0.1; %% GRID PARAMETERS N = 128; % Frequency gridpoints (Nkr = N/2) 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 '' +PMAXE = 3; % Highest electron Hermite polynomial degree +JMAXE = 2; % Highest '' Laguerre '' +PMAXI = 3; % Highest ion Hermite polynomial degree +JMAXI = 2; % Highest '' Laguerre '' %% TIME PARAMETERS -TMAX = 400; % Maximal time unit +TMAX = 150; % Maximal time unit DT = 3e-2; % Time step SPS0D = 1/DT; % Sampling per time unit for profiler -SPS2D = 2; % Sampling per time unit for 2D arrays +SPS2D = 1; % Sampling per time unit for 2D arrays SPS5D = 1/5; % 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; %% OPTIONS -SIMID = 'test_precomp_kernel'; % Name of the simulation -CO = -1; % Collision operator (0 : L.Bernstein, -1 : Full Coulomb, -2 : Dougherty, -3 : GK Dougherty) +SIMID = 'test_DGGK'; % Name of the simulation +CO = -3; % Collision operator (0 : L.Bernstein, -1 : Full Coulomb, -2 : Dougherty, -3 : GK Dougherty) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% unused diff --git a/wk/marconi_run.m b/wk/marconi_run.m index b2b28af6..e0011758 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 = '24:00:00'; % allocation time hh:mm:ss +CLUSTER.TIME = '02: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 @@ -19,8 +19,8 @@ NU_HYP = 0.1; % Hyperdiffusivity coefficient %% GRID PARAMETERS N = 200; % Frequency gridpoints (Nkr = N/2) L = 100; % Size of the squared frequency domain -P = 8; % Electron and Ion highest Hermite polynomial degree -J = 4; % Electron and Ion highest Laguerre polynomial degree +P = 2; % Electron and Ion highest Hermite polynomial degree +J = 1; % Electron and Ion highest Laguerre polynomial degree %% TIME PARAMETERS TMAX = 400; % Maximal time unit DT = 1e-2; % Time step @@ -31,7 +31,7 @@ SPSCP = 1/10; % Sampling per time unit for checkpoints RESTART = 0; % To restart from last checkpoint JOB2LOAD= 0; %% OPTIONS -SIMID = 'Marconi_new_AA'; % Name of the simulation +SIMID = 'Marconi_new_truncation'; % Name of the simulation CO = -1; % Collision operator (0 : L.Bernstein, -1 : Full Coulomb, -2 : Dougherty) diff --git a/wk/setup.m b/wk/setup.m index 7e4ec8eb..2d0dd8c0 100644 --- a/wk/setup.m +++ b/wk/setup.m @@ -59,6 +59,7 @@ INITIAL.iemat_file = ... if (CO == 0); CONAME = 'LB'; elseif(CO == -1); CONAME = 'FC'; elseif(CO == -2); CONAME = 'DG'; +elseif(CO == -3); CONAME = 'DGGK'; end degngrad = ['Pe_',num2str(PMAXE),'_Je_',num2str(JMAXE),... '_Pi_',num2str(PMAXI),'_Ji_',num2str(JMAXI),... -- GitLab