From ea0bb1e98e860a264444d6706b1169b7700ced3c Mon Sep 17 00:00:00 2001
From: Antoine Hoffmann <antoine.hoffmann@epfl.ch>
Date: Fri, 16 Feb 2024 16:04:39 +0100
Subject: [PATCH] create a demonstration folder

---
 .../2D_Z_pinch/GS2_method/fort_01.90          |  91 +++++++++++++++
 .../2D_Z_pinch/background_Er/fort_01.90       |  92 +++++++++++++++
 demo/ExB_shear/2D_Z_pinch/control/fort_01.90  |  91 +++++++++++++++
 demo/ExB_shear/2D_Z_pinch/fort_00.90          |  90 +++++++++++++++
 demo/ExB_shear/GS2_method/fast_analysis.m     |  33 ++++++
 demo/ExB_shear/GS2_method/fort_00.90          | 100 ++++++++++++++++
 demo/ExB_shear/background_Er/fast_analysis.m  |  53 +++++++++
 demo/ExB_shear/background_Er/fort.90          | 107 ++++++++++++++++++
 demo/ExB_shear/background_Er/fort_00.90       | 101 +++++++++++++++++
 .../2D_Z_pinch/Nmax_0/fort_00.90              |  91 +++++++++++++++
 .../anti_Laguerre_aliasing/fort_00.90         |  90 +++++++++++++++
 demo/Laguerre_aliasing/2D_Z_pinch/fort_00.90  |  90 +++++++++++++++
 .../2D_Z_pinch/maximized_sum/fort_00.90       |  91 +++++++++++++++
 13 files changed, 1120 insertions(+)
 create mode 100644 demo/ExB_shear/2D_Z_pinch/GS2_method/fort_01.90
 create mode 100644 demo/ExB_shear/2D_Z_pinch/background_Er/fort_01.90
 create mode 100644 demo/ExB_shear/2D_Z_pinch/control/fort_01.90
 create mode 100644 demo/ExB_shear/2D_Z_pinch/fort_00.90
 create mode 100644 demo/ExB_shear/GS2_method/fast_analysis.m
 create mode 100644 demo/ExB_shear/GS2_method/fort_00.90
 create mode 100644 demo/ExB_shear/background_Er/fast_analysis.m
 create mode 100644 demo/ExB_shear/background_Er/fort.90
 create mode 100644 demo/ExB_shear/background_Er/fort_00.90
 create mode 100644 demo/Laguerre_aliasing/2D_Z_pinch/Nmax_0/fort_00.90
 create mode 100644 demo/Laguerre_aliasing/2D_Z_pinch/anti_Laguerre_aliasing/fort_00.90
 create mode 100644 demo/Laguerre_aliasing/2D_Z_pinch/fort_00.90
 create mode 100644 demo/Laguerre_aliasing/2D_Z_pinch/maximized_sum/fort_00.90

diff --git a/demo/ExB_shear/2D_Z_pinch/GS2_method/fort_01.90 b/demo/ExB_shear/2D_Z_pinch/GS2_method/fort_01.90
new file mode 100644
index 0000000..ed67568
--- /dev/null
+++ b/demo/ExB_shear/2D_Z_pinch/GS2_method/fort_01.90
@@ -0,0 +1,91 @@
+&BASIC
+  nrun       = 1e6
+  dt         = 0.05
+  tmax       = 200
+  maxruntime = 72000
+  job2load   = 0
+/
+&GRID
+  pmax   = 2
+  jmax   = 1
+  Nx     = 128
+  Lx     = 200
+  Ny     = 48
+  Ly     = 60
+  Nz     = 1
+  SG     = .f.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'z-pinch'
+/
+&DIAGNOSTICS
+  dtsave_0d = 1
+  dtsave_1d = -1
+  dtsave_2d = 0.5
+  dtsave_3d = 0.5
+  dtsave_5d = 100
+  write_doubleprecision = .f.
+  write_gamma = .t.
+  write_hf    = .t.
+  write_phi   = .t.
+  write_Na00  = .t.
+  write_Napj  = .t.
+  write_dens  = .t.
+  write_fvel  = .t.
+  write_temp  = .t.
+/
+&MODEL
+  LINEARITY = 'nonlinear'
+  Na      = 2 ! number of species
+  mu_x    = 1.0
+  mu_y    = 1.0
+  N_HD    = 4
+  mu_z    = 0.0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0.0
+  mu_j    = 0.0
+  nu      = 0.1
+  beta    = 0.0
+  ADIAB_E = .f.
+  tau_i   = 1.0
+  ExBrate = 0.5
+/
+&CLOSURE
+  hierarchy_closure='truncation'
+  !hierarchy_closure='max_degree'
+  dmax = 2
+  nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
+  nmax = -1
+/
+&SPECIES
+ ! ions
+ name_ = 'ions'
+ tau_  = 1.0
+ sigma_= 1.0
+ q_    = 1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&SPECIES
+ ! electrons
+ name_ = 'electrons'
+ tau_  = 1.0
+ sigma_= 0.023338
+ q_    =-1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&COLLISION
+  collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
+  GK_CO           = .t.
+/
+&INITIAL
+  INIT_OPT         = 'phi' !(phi,blob)
+  init_background  = 0.0
+  init_noiselvl    = 0.005
+  iseed            = 42
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/ExB_shear/2D_Z_pinch/background_Er/fort_01.90 b/demo/ExB_shear/2D_Z_pinch/background_Er/fort_01.90
new file mode 100644
index 0000000..6c7afdd
--- /dev/null
+++ b/demo/ExB_shear/2D_Z_pinch/background_Er/fort_01.90
@@ -0,0 +1,92 @@
+&BASIC
+  nrun       = 1e6
+  dt         = 0.025
+  tmax       = 200
+  maxruntime = 72000
+  job2load   = 0
+/
+&GRID
+  pmax   = 2
+  jmax   = 1
+  Nx     = 128
+  Lx     = 200
+  Ny     = 48
+  Ly     = 60
+  Nz     = 1
+  SG     = .f.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'z-pinch'
+/
+&DIAGNOSTICS
+  dtsave_0d = 1
+  dtsave_1d = -1
+  dtsave_2d = 0.5
+  dtsave_3d = 0.5
+  dtsave_5d = 100
+  write_doubleprecision = .f.
+  write_gamma = .t.
+  write_hf    = .t.
+  write_phi   = .t.
+  write_Na00  = .t.
+  write_Napj  = .t.
+  write_dens  = .t.
+  write_fvel  = .t.
+  write_temp  = .t.
+/
+&MODEL
+  LINEARITY = 'nonlinear'
+  Na      = 2 ! number of species
+  mu_x    = 1.0
+  mu_y    = 1.0
+  N_HD    = 4
+  mu_z    = 0.0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0.0
+  mu_j    = 0.0
+  nu      = 0.1
+  beta    = 0.0
+  ADIAB_E = .f.
+  tau_i   = 1.0
+  ZFrate  = 1.0
+  ikxZF   = 1
+/
+&CLOSURE
+  hierarchy_closure='truncation'
+  !hierarchy_closure='max_degree'
+  dmax = 2
+  nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
+  nmax = -1
+/
+&SPECIES
+ ! ions
+ name_ = 'ions'
+ tau_  = 1.0
+ sigma_= 1.0
+ q_    = 1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&SPECIES
+ ! electrons
+ name_ = 'electrons'
+ tau_  = 1.0
+ sigma_= 0.023338
+ q_    =-1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&COLLISION
+  collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
+  GK_CO           = .t.
+/
+&INITIAL
+  INIT_OPT         = 'phi' !(phi,blob)
+  init_background  = 0.0
+  init_noiselvl    = 0.005
+  iseed            = 42
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/ExB_shear/2D_Z_pinch/control/fort_01.90 b/demo/ExB_shear/2D_Z_pinch/control/fort_01.90
new file mode 100644
index 0000000..5899fc0
--- /dev/null
+++ b/demo/ExB_shear/2D_Z_pinch/control/fort_01.90
@@ -0,0 +1,91 @@
+&BASIC
+  nrun       = 1e6
+  dt         = 0.05
+  tmax       = 200
+  maxruntime = 72000
+  job2load   = 0
+/
+&GRID
+  pmax   = 2
+  jmax   = 1
+  Nx     = 128
+  Lx     = 200
+  Ny     = 48
+  Ly     = 60
+  Nz     = 1
+  SG     = .f.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'z-pinch'
+/
+&DIAGNOSTICS
+  dtsave_0d = 1
+  dtsave_1d = -1
+  dtsave_2d = 0.5
+  dtsave_3d = 0.5
+  dtsave_5d = 100
+  write_doubleprecision = .f.
+  write_gamma = .t.
+  write_hf    = .t.
+  write_phi   = .t.
+  write_Na00  = .t.
+  write_Napj  = .t.
+  write_dens  = .t.
+  write_fvel  = .t.
+  write_temp  = .t.
+/
+&MODEL
+  LINEARITY = 'nonlinear'
+  Na      = 2 ! number of species
+  mu_x    = 1.0
+  mu_y    = 1.0
+  N_HD    = 4
+  mu_z    = 0.0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0.0
+  mu_j    = 0.0
+  nu      = 0.1
+  beta    = 0.0
+  ADIAB_E = .f.
+  tau_i   = 1.0
+  ExBrate = 0
+/
+&CLOSURE
+  hierarchy_closure='truncation'
+  !hierarchy_closure='max_degree'
+  dmax = 2
+  nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
+  nmax = -1
+/
+&SPECIES
+ ! ions
+ name_ = 'ions'
+ tau_  = 1.0
+ sigma_= 1.0
+ q_    = 1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&SPECIES
+ ! electrons
+ name_ = 'electrons'
+ tau_  = 1.0
+ sigma_= 0.023338
+ q_    =-1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&COLLISION
+  collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
+  GK_CO           = .t.
+/
+&INITIAL
+  INIT_OPT         = 'phi' !(phi,blob)
+  init_background  = 0.0
+  init_noiselvl    = 0.005
+  iseed            = 42
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/ExB_shear/2D_Z_pinch/fort_00.90 b/demo/ExB_shear/2D_Z_pinch/fort_00.90
new file mode 100644
index 0000000..b991ce5
--- /dev/null
+++ b/demo/ExB_shear/2D_Z_pinch/fort_00.90
@@ -0,0 +1,90 @@
+&BASIC
+  nrun       = 1e6
+  dt         = 0.05
+  tmax       = 100
+  maxruntime = 72000
+  job2load   = -1
+/
+&GRID
+  pmax   = 2
+  jmax   = 1
+  Nx     = 128
+  Lx     = 200
+  Ny     = 48
+  Ly     = 60
+  Nz     = 1
+  SG     = .f.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'z-pinch'
+/
+&DIAGNOSTICS
+  dtsave_0d = 1
+  dtsave_1d = -1
+  dtsave_2d = 0.5
+  dtsave_3d = 0.5
+  dtsave_5d = 100
+  write_doubleprecision = .f.
+  write_gamma = .t.
+  write_hf    = .t.
+  write_phi   = .t.
+  write_Na00  = .t.
+  write_Napj  = .t.
+  write_dens  = .t.
+  write_fvel  = .t.
+  write_temp  = .t.
+/
+&MODEL
+  LINEARITY = 'nonlinear'
+  Na      = 2 ! number of species
+  mu_x    = 1.0
+  mu_y    = 1.0
+  N_HD    = 4
+  mu_z    = 0.0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0.0
+  mu_j    = 0.0
+  nu      = 0.1
+  beta    = 0.0
+  ADIAB_E = .f.
+  tau_i   = 1.0
+/
+&CLOSURE
+  hierarchy_closure='truncation'
+  !hierarchy_closure='max_degree'
+  dmax = 2
+  nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
+  nmax = -1
+/
+&SPECIES
+ ! ions
+ name_ = 'ions'
+ tau_  = 1.0
+ sigma_= 1.0
+ q_    = 1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&SPECIES
+ ! electrons
+ name_ = 'electrons'
+ tau_  = 1.0
+ sigma_= 0.023338
+ q_    =-1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&COLLISION
+  collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
+  GK_CO           = .t.
+/
+&INITIAL
+  INIT_OPT         = 'phi' !(phi,blob)
+  init_background  = 0.0
+  init_noiselvl    = 0.005
+  iseed            = 42
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/ExB_shear/GS2_method/fast_analysis.m b/demo/ExB_shear/GS2_method/fast_analysis.m
new file mode 100644
index 0000000..773ded3
--- /dev/null
+++ b/demo/ExB_shear/GS2_method/fast_analysis.m
@@ -0,0 +1,33 @@
+gyacomodir = '../../../';
+addpath(genpath([gyacomodir,'matlab'])) % ... add
+addpath(genpath([gyacomodir,'matlab/plot'])) % ... add
+addpath(genpath([gyacomodir,'matlab/compute'])) % ... add
+addpath(genpath([gyacomodir,'matlab/load'])) % ... add
+default_plots_options
+
+J0 = 00; J1 = 00;
+
+% Load basic info (grids and time traces)
+DATADIR = [pwd,'/'];
+data    = {};
+data    = compile_results_low_mem(data,DATADIR,J0,J1);
+[data.Na00, data.Ts3D] = compile_results_3Da(DATADIR,J0,J1,'Na00');
+data.Ni00 = reshape(data.Na00(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
+
+% field snapshots
+options.INTERP    = 0;
+options.POLARPLOT = 0;
+options.AXISEQUAL = 1;
+options.NORMALIZE = 0;
+options.LOGSCALE  = 0;
+options.CLIMAUTO  = 1;
+options.NAME      = ['N_i^{00}'];
+options.PLAN      = 'xy'; options.COMP =floor(data.grids.Nz/2)+1;
+options.TIME      = [0 0.5 1.0];
+options.RESOLUTION = 256;
+options.BWR       = 0; % bluewhitered plot or gray
+fig = photomaton(data,options);
+colormap(gray)
+clim('auto')
+data.FIGDIR = DATADIR;
+save_figure(data,fig,'.png');
diff --git a/demo/ExB_shear/GS2_method/fort_00.90 b/demo/ExB_shear/GS2_method/fort_00.90
new file mode 100644
index 0000000..268c4fe
--- /dev/null
+++ b/demo/ExB_shear/GS2_method/fort_00.90
@@ -0,0 +1,100 @@
+&BASIC
+  nrun       = 100000000
+  dt         = 0.001
+  tmax       = 1.0
+  maxruntime = 356400
+  job2load   = -1
+/
+&GRID
+  pmax  = 0
+  jmax  = 0
+  Nx     = 186
+  Lx     = 100
+  Ny     = 186
+  Ly     = 100
+  Nz     = 1
+  SG     = .false.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'zpinch'!'miller'
+  q0     = 1.0
+  shear  = 0.0
+  eps    = 0.0
+  kappa  = 1
+  s_kappa  = 0
+  delta  = 0
+  s_delta  = 0
+  zeta   = 0
+  s_zeta   = 0
+  parallel_bc = 'dirichlet'
+  shift_y = 0
+  Npol    = 1
+  PB_PHASE= .false.
+/
+&DIAGNOSTICS
+  dtsave_0d = 0.01
+  dtsave_1d = -1
+  dtsave_2d = -1
+  dtsave_3d = 0.01
+  dtsave_5d = 100
+  write_doubleprecision = .true.
+  write_gamma = .true.
+  write_hf    = .true.
+  write_phi   = .true.
+  write_Na00  = .true.
+  write_Napj  = .true.
+  write_dens  = .true.
+  write_temp  = .true.
+/
+&MODEL
+LINEARITY = 'nonlinear'
+RM_LD_T_EQ= .false.
+  Na      = 1
+  mu_x    = 1
+  mu_y    = 1
+  N_HD    = 4
+  mu_z    = 0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0
+  mu_j    = 0
+  nu      = 1
+  k_gB    = 0
+  k_cB    = 0
+  lambdaD = 0
+  beta    = 0.0
+  ExBrate = 0.0
+  ikxZF   = 2
+  ZFamp   = 0
+  ADIAB_E = .true.
+  ADIAB_I = .false.
+  tau_i   = 1
+  MHD_PD  = .false.
+/
+&CLOSURE
+  hierarchy_closure='truncation'
+  dmax             =-1
+  nonlinear_closure='truncation'
+  nmax             =0
+/
+&SPECIES
+  name_  = 'ions' 
+  tau_   = 1
+  sigma_ = 1
+  q_     = 1
+  K_N_   = 0
+  K_T_   = 0
+/
+&COLLISION
+  collision_model = 'DG'
+  GK_CO      = .false.
+  INTERSPECIES    = .true.
+  mat_file        = '/home/ahoffman/gyacomo/iCa/null'
+  collision_kcut  = 1
+/
+&INITIAL
+  INIT_OPT = 'ricci'
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/ExB_shear/background_Er/fast_analysis.m b/demo/ExB_shear/background_Er/fast_analysis.m
new file mode 100644
index 0000000..ade8aed
--- /dev/null
+++ b/demo/ExB_shear/background_Er/fast_analysis.m
@@ -0,0 +1,53 @@
+gyacomodir = '../../../';
+addpath(genpath([gyacomodir,'matlab'])) % ... add
+addpath(genpath([gyacomodir,'matlab/plot'])) % ... add
+addpath(genpath([gyacomodir,'matlab/compute'])) % ... add
+addpath(genpath([gyacomodir,'matlab/load'])) % ... add
+default_plots_options
+
+J0 = 00; J1 = 00;
+
+% Load basic info (grids and time traces)
+DATADIR = [pwd,'/'];
+data    = {};
+data    = compile_results_low_mem(data,DATADIR,J0,J1);
+[data.Na00, data.Ts3D] = compile_results_3Da(DATADIR,J0,J1,'Na00');
+data.Ni00 = reshape(data.Na00(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
+
+% field snapshots
+options.INTERP    = 0;
+options.POLARPLOT = 0;
+options.AXISEQUAL = 1;
+options.NORMALIZE = 0;
+options.LOGSCALE  = 0;
+options.CLIMAUTO  = 1;
+options.NAME      = ['N_i^{00}'];
+options.PLAN      = 'xy'; options.COMP =floor(data.grids.Nz/2)+1;
+options.TIME      = [0 2.0 4.0];
+options.RESOLUTION = 256;
+options.BWR       = 0; % bluewhitered plot or gray
+fig = photomaton(data,options);
+colormap(gray)
+clim('auto')
+data.FIGDIR = DATADIR;
+% save_figure(data,fig,'.png');
+
+
+if 0
+%% MOVIES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+options.INTERP    = 1;
+options.POLARPLOT = 0;
+options.BWR       = 0; % bluewhitered plot or gray
+options.CLIMAUTO  = 1; % adjust the colormap auto
+options.NAME     = ['N_i^{00}'];
+% options.NAME     = ['N_i^{00}'];
+options.PLAN      = ['xy'];
+options.COMP      = 1;
+options.TIME      =  data.Ts3D(1:1:end);
+data.EPS          = 0.1;
+data.a = data.EPS * 2000;
+options.RESOLUTION = 64;
+options.FPS       = 12;
+options.RMAXIS    = 1;
+create_film(data,options,'.gif')
+end
diff --git a/demo/ExB_shear/background_Er/fort.90 b/demo/ExB_shear/background_Er/fort.90
new file mode 100644
index 0000000..c8d537d
--- /dev/null
+++ b/demo/ExB_shear/background_Er/fort.90
@@ -0,0 +1,107 @@
+&BASIC
+  nrun       = 100000000
+  dt         = 0.05
+  tmax       = 5.0
+  maxruntime = 356400
+  job2load   = -1
+/
+&GRID
+  pmax  = 0
+  jmax  = 0
+  Nx     = 186
+  Lx     = 100
+  Ny     = 186
+  Ly     = 100
+  Nz     = 1
+  SG     = .false.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'zpinch'!'miller'
+  q0     = 1.0
+  shear  = 0.0
+  eps    = 0.0
+  kappa  = 1
+  s_kappa  = 0
+  delta  = 0
+  s_delta  = 0
+  zeta   = 0
+  s_zeta   = 0
+  parallel_bc = 'dirichlet'
+  shift_y = 0
+  Npol    = 1
+  PB_PHASE= .false.
+/
+&DIAGNOSTICS
+  dtsave_0d = 0.05
+  dtsave_1d = -1
+  dtsave_2d = -1
+  dtsave_3d = 0.025
+  dtsave_5d = -1
+  write_doubleprecision = .true.
+  write_gamma = .true.
+  write_hf    = .true.
+  write_phi   = .true.
+  write_Na00  = .true.
+  write_Napj  = .true.
+  write_dens  = .true.
+  write_temp  = .true.
+/
+&MODEL
+LINEARITY = 'nonlinear'
+RM_LD_T_EQ= .false.
+  Na      = 1
+  mu_x    = 1
+  mu_y    = 1
+  N_HD    = 4
+  mu_z    = 0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0
+  mu_j    = 0
+  nu      = 0
+  k_gB    = 0
+  k_cB    = 0
+  lambdaD = 0
+  beta    = 0.0
+  ExBrate = 0.0
+  ikxZF   = 1
+  ZFrate  =-0.5
+  ZF_ONLY = .t.
+  ADIAB_E = .true.
+  ADIAB_I = .false.
+  tau_i   = 1
+  MHD_PD  = .false.
+/
+&CLOSURE
+  hierarchy_closure='truncation'
+  dmax             =-1
+  nonlinear_closure='truncation'
+  nmax             =0
+/
+&SPECIES
+  name_  = 'ions' 
+  tau_   = 1
+  sigma_ = 1
+  q_     = 1
+  K_N_   = 0
+  K_T_   = 0
+/
+&COLLISION
+  collision_model = 'DG'
+  GK_CO      = .false.
+  INTERSPECIES    = .true.
+  mat_file        = '/home/ahoffman/gyacomo/iCa/null'
+  collision_kcut  = 1
+/
+&INITIAL
+  INIT_OPT = 'mom00_mode'
+  Nmodes = 1
+/
+&MODE
+  I_   = 0
+  J_   = 1
+  amp_ = 1000
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/ExB_shear/background_Er/fort_00.90 b/demo/ExB_shear/background_Er/fort_00.90
new file mode 100644
index 0000000..f935e52
--- /dev/null
+++ b/demo/ExB_shear/background_Er/fort_00.90
@@ -0,0 +1,101 @@
+&BASIC
+  nrun       = 100000000
+  dt         = 0.05
+  tmax       = 10.0
+  maxruntime = 356400
+  job2load   = -1
+/
+&GRID
+  pmax  = 0
+  jmax  = 0
+  Nx     = 186
+  Lx     = 100
+  Ny     = 186
+  Ly     = 100
+  Nz     = 1
+  SG     = .false.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'zpinch'!'miller'
+  q0     = 1.0
+  shear  = 0.0
+  eps    = 0.0
+  kappa  = 1
+  s_kappa  = 0
+  delta  = 0
+  s_delta  = 0
+  zeta   = 0
+  s_zeta   = 0
+  parallel_bc = 'dirichlet'
+  shift_y = 0
+  Npol    = 1
+  PB_PHASE= .false.
+/
+&DIAGNOSTICS
+  dtsave_0d = 0.05
+  dtsave_1d = -1
+  dtsave_2d = -1
+  dtsave_3d = 0.025
+  dtsave_5d = -1
+  write_doubleprecision = .true.
+  write_gamma = .true.
+  write_hf    = .true.
+  write_phi   = .true.
+  write_Na00  = .true.
+  write_Napj  = .true.
+  write_dens  = .true.
+  write_temp  = .true.
+/
+&MODEL
+LINEARITY = 'nonlinear'
+RM_LD_T_EQ= .false.
+  Na      = 1
+  mu_x    = 1
+  mu_y    = 1
+  N_HD    = 4
+  mu_z    = 0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0
+  mu_j    = 0
+  nu      = 0
+  k_gB    = 0
+  k_cB    = 0
+  lambdaD = 0
+  beta    = 0.0
+  ExBrate = 0
+  ikxZF   = 1
+  ZFrate  = 0.5
+  ZF_ONLY = .t.
+  ADIAB_E = .true.
+  ADIAB_I = .false.
+  tau_i   = 1
+  MHD_PD  = .false.
+/
+&CLOSURE
+  hierarchy_closure='truncation'
+  dmax             =-1
+  nonlinear_closure='truncation'
+  nmax             =0
+/
+&SPECIES
+  name_  = 'ions' 
+  tau_   = 1
+  sigma_ = 1
+  q_     = 1
+  K_N_   = 0
+  K_T_   = 0
+/
+&COLLISION
+  collision_model = 'DG'
+  GK_CO      = .false.
+  INTERSPECIES    = .true.
+  mat_file        = '/home/ahoffman/gyacomo/iCa/null'
+  collision_kcut  = 1
+/
+&INITIAL
+  INIT_OPT = 'ricci'
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/Laguerre_aliasing/2D_Z_pinch/Nmax_0/fort_00.90 b/demo/Laguerre_aliasing/2D_Z_pinch/Nmax_0/fort_00.90
new file mode 100644
index 0000000..4957871
--- /dev/null
+++ b/demo/Laguerre_aliasing/2D_Z_pinch/Nmax_0/fort_00.90
@@ -0,0 +1,91 @@
+&BASIC
+  nrun       = 1e6
+  dt         = 0.02
+  tmax       = 500
+  maxruntime = 72000
+  job2load   = -1
+/
+&GRID
+  pmax   = 2
+  jmax   = 1
+  Nx     = 128
+  Lx     = 200
+  Ny     = 48
+  Ly     = 60
+  Nz     = 1
+  SG     = .f.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'z-pinch'
+/
+&DIAGNOSTICS
+  dtsave_0d = 1
+  dtsave_1d = -1
+  dtsave_2d = -1
+  dtsave_3d = 2
+  dtsave_5d = 50
+  write_doubleprecision = .f.
+  write_gamma = .t.
+  write_hf    = .t.
+  write_phi   = .t.
+  write_Na00  = .t.
+  write_Napj  = .t.
+  write_dens  = .t.
+  write_fvel  = .t.
+  write_temp  = .t.
+/
+&MODEL
+  LINEARITY = 'nonlinear'
+  Na      = 2 ! number of species
+  mu_x    = 1.0
+  mu_y    = 0.0
+  N_HD    = 4
+  mu_z    = 0.0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0.0
+  mu_j    = 0.0
+  nu      = 0.05
+  beta    = 0.0
+  ADIAB_E = .f.
+  tau_i   = 1.0
+/
+&CLOSURE
+  !hierarchy_closure='truncation'
+  hierarchy_closure='max_degree'
+  dmax = 2
+  !nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
+  nonlinear_closure='truncation'
+  nmax = 0
+/
+&SPECIES
+ ! ions
+ name_ = 'ions'
+ tau_  = 1.0
+ sigma_= 1.0
+ q_    = 1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&SPECIES
+ ! electrons
+ name_ = 'electrons'
+ tau_  = 1.0
+ sigma_= 0.023338
+ q_    =-1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&COLLISION
+  collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
+  GK_CO           = .t.
+/
+&INITIAL
+  INIT_OPT         = 'phi' !(phi,blob)
+  init_background  = 0.0
+  init_noiselvl    = 0.005
+  iseed            = 42
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/Laguerre_aliasing/2D_Z_pinch/anti_Laguerre_aliasing/fort_00.90 b/demo/Laguerre_aliasing/2D_Z_pinch/anti_Laguerre_aliasing/fort_00.90
new file mode 100644
index 0000000..79b5231
--- /dev/null
+++ b/demo/Laguerre_aliasing/2D_Z_pinch/anti_Laguerre_aliasing/fort_00.90
@@ -0,0 +1,90 @@
+&BASIC
+  nrun       = 1e6
+  dt         = 0.02
+  tmax       = 500
+  maxruntime = 72000
+  job2load   = -1
+/
+&GRID
+  pmax   = 2
+  jmax   = 1
+  Nx     = 128
+  Lx     = 200
+  Ny     = 48
+  Ly     = 60
+  Nz     = 1
+  SG     = .f.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'z-pinch'
+/
+&DIAGNOSTICS
+  dtsave_0d = 1
+  dtsave_1d = -1
+  dtsave_2d = -1
+  dtsave_3d = 2
+  dtsave_5d = 50
+  write_doubleprecision = .f.
+  write_gamma = .t.
+  write_hf    = .t.
+  write_phi   = .t.
+  write_Na00  = .t.
+  write_Napj  = .t.
+  write_dens  = .t.
+  write_fvel  = .t.
+  write_temp  = .t.
+/
+&MODEL
+  LINEARITY = 'nonlinear'
+  Na      = 2 ! number of species
+  mu_x    = 1.0
+  mu_y    = 0.0
+  N_HD    = 4
+  mu_z    = 0.0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0.0
+  mu_j    = 0.0
+  nu      = 0.05
+  beta    = 0.0
+  ADIAB_E = .f.
+  tau_i   = 1.0
+/
+&CLOSURE
+  !hierarchy_closure='truncation'
+  hierarchy_closure='max_degree'
+  dmax = 2
+  nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
+  nmax = -1
+/
+&SPECIES
+ ! ions
+ name_ = 'ions'
+ tau_  = 1.0
+ sigma_= 1.0
+ q_    = 1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&SPECIES
+ ! electrons
+ name_ = 'electrons'
+ tau_  = 1.0
+ sigma_= 0.023338
+ q_    =-1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&COLLISION
+  collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
+  GK_CO           = .t.
+/
+&INITIAL
+  INIT_OPT         = 'phi' !(phi,blob)
+  init_background  = 0.0
+  init_noiselvl    = 0.005
+  iseed            = 42
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/Laguerre_aliasing/2D_Z_pinch/fort_00.90 b/demo/Laguerre_aliasing/2D_Z_pinch/fort_00.90
new file mode 100644
index 0000000..190c9ff
--- /dev/null
+++ b/demo/Laguerre_aliasing/2D_Z_pinch/fort_00.90
@@ -0,0 +1,90 @@
+&BASIC
+  nrun       = 1e6
+  dt         = 0.05
+  tmax       = 500
+  maxruntime = 72000
+  job2load   = -1
+/
+&GRID
+  pmax   = 2
+  jmax   = 1
+  Nx     = 128
+  Lx     = 200
+  Ny     = 48
+  Ly     = 60
+  Nz     = 1
+  SG     = .f.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'z-pinch'
+/
+&DIAGNOSTICS
+  dtsave_0d = 1
+  dtsave_1d = -1
+  dtsave_2d = 0.5
+  dtsave_3d = 0.5
+  dtsave_5d = 100
+  write_doubleprecision = .f.
+  write_gamma = .t.
+  write_hf    = .t.
+  write_phi   = .t.
+  write_Na00  = .t.
+  write_Napj  = .t.
+  write_dens  = .t.
+  write_fvel  = .t.
+  write_temp  = .t.
+/
+&MODEL
+  LINEARITY = 'nonlinear'
+  Na      = 2 ! number of species
+  mu_x    = 1.0
+  mu_y    = 0.0
+  N_HD    = 4
+  mu_z    = 0.0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0.0
+  mu_j    = 0.0
+  nu      = 0.05
+  beta    = 0.0
+  ADIAB_E = .f.
+  tau_i   = 1.0
+/
+&CLOSURE
+  hierarchy_closure='truncation'
+  !hierarchy_closure='max_degree'
+  dmax = 2
+  nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
+  nmax = -1
+/
+&SPECIES
+ ! ions
+ name_ = 'ions'
+ tau_  = 1.0
+ sigma_= 1.0
+ q_    = 1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&SPECIES
+ ! electrons
+ name_ = 'electrons'
+ tau_  = 1.0
+ sigma_= 0.023338
+ q_    =-1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&COLLISION
+  collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
+  GK_CO           = .t.
+/
+&INITIAL
+  INIT_OPT         = 'phi' !(phi,blob)
+  init_background  = 0.0
+  init_noiselvl    = 0.005
+  iseed            = 42
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
diff --git a/demo/Laguerre_aliasing/2D_Z_pinch/maximized_sum/fort_00.90 b/demo/Laguerre_aliasing/2D_Z_pinch/maximized_sum/fort_00.90
new file mode 100644
index 0000000..a163082
--- /dev/null
+++ b/demo/Laguerre_aliasing/2D_Z_pinch/maximized_sum/fort_00.90
@@ -0,0 +1,91 @@
+&BASIC
+  nrun       = 1e6
+  dt         = 0.02
+  tmax       = 500
+  maxruntime = 72000
+  job2load   = -1
+/
+&GRID
+  pmax   = 2
+  jmax   = 1
+  Nx     = 128
+  Lx     = 200
+  Ny     = 48
+  Ly     = 60
+  Nz     = 1
+  SG     = .f.
+  Nexc   = 1
+/
+&GEOMETRY
+  geom   = 'z-pinch'
+/
+&DIAGNOSTICS
+  dtsave_0d = 1
+  dtsave_1d = -1
+  dtsave_2d = -1
+  dtsave_3d = 2
+  dtsave_5d = 50
+  write_doubleprecision = .f.
+  write_gamma = .t.
+  write_hf    = .t.
+  write_phi   = .t.
+  write_Na00  = .t.
+  write_Napj  = .t.
+  write_dens  = .t.
+  write_fvel  = .t.
+  write_temp  = .t.
+/
+&MODEL
+  LINEARITY = 'nonlinear'
+  Na      = 2 ! number of species
+  mu_x    = 1.0
+  mu_y    = 0.0
+  N_HD    = 4
+  mu_z    = 0.0
+  HYP_V   = 'hypcoll'
+  mu_p    = 0.0
+  mu_j    = 0.0
+  nu      = 0.05
+  beta    = 0.0
+  ADIAB_E = .f.
+  tau_i   = 1.0
+/
+&CLOSURE
+  !hierarchy_closure='truncation'
+  hierarchy_closure='max_degree'
+  dmax = 2
+  !nonlinear_closure='anti_laguerre_aliasing' !(truncation,full_sum,anti_laguerre_aliasing)
+  nonlinear_closure='full_sum'
+  nmax = -1
+/
+&SPECIES
+ ! ions
+ name_ = 'ions'
+ tau_  = 1.0
+ sigma_= 1.0
+ q_    = 1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&SPECIES
+ ! electrons
+ name_ = 'electrons'
+ tau_  = 1.0
+ sigma_= 0.023338
+ q_    =-1.0
+ k_N_  = 2.0
+ k_T_  = 0.4
+/
+&COLLISION
+  collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau)
+  GK_CO           = .t.
+/
+&INITIAL
+  INIT_OPT         = 'phi' !(phi,blob)
+  init_background  = 0.0
+  init_noiselvl    = 0.005
+  iseed            = 42
+/
+&TIME_INTEGRATION
+  numerical_scheme = 'RK4'
+/
-- 
GitLab