Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions examples/classification/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
# Example for plotting classification over radius s and perpendicular invariant Jperp

FC = gfortran
FFLAGS = -g -fbacktrace
# Classification example reproducing JPP 2020 paper results
# (Albert, Kasilov, Kernbichler, J. Plasma Phys. 86, 815860201)
#
# Configurations: QI (Drevlak 2014), QH (Drevlak 2018), QA (Henneberg 2019)
#
# Targets:
# make run - run all 10 cases under /tmp/simple_classification
# make plot - generate all paper-style plots from results
# make clean - remove local output files and /tmp results

SIMPLE_X = ../../build/simple.x
BASE_DIR = /tmp/simple_classification

all: plot

plot: prompt1.dat regular1.dat stochastic1.dat prompt2.dat regular2.dat stochastic2.dat plot_classification.py
python plot_classification.py

prompt1.dat regular1.dat stochastic1.dat prompt2.dat regular2.dat stochastic2.dat: class_parts.dat postprocess_class.x
./postprocess_class.x
run: $(SIMPLE_X)
bash run_all.sh

class_parts.dat: simple.in wout_LandremanPaul2021_QH_reactorScale_lowres_reference.nc
../../build/simple.x
plot:
source ../../.venv/bin/activate && python plot_paper_results.py $(BASE_DIR)

wout_LandremanPaul2021_QH_reactorScale_lowres_reference.nc:
wget https://github.com/hiddenSymmetries/simsopt/raw/master/tests/test_files/wout_LandremanPaul2021_QH_reactorScale_lowres_reference.nc
# Legacy volume classification (runs in-place with simple.in)
plot-local: class_parts.dat bminmax.dat
source ../../.venv/bin/activate && python plot_classification.py

postprocess_class.x: postprocess_class.f90
$(FC) $(FFLAGS) -o postprocess_class.x postprocess_class.f90
class_parts.dat bminmax.dat: simple.in
$(SIMPLE_X)

clean:
rm -f *.x *.dat fort.* *.pdf
rm -f *.dat fort.* *.pdf
rm -rf $(BASE_DIR)
26 changes: 0 additions & 26 deletions examples/classification/README.md

This file was deleted.

15 changes: 15 additions & 0 deletions examples/classification/configs/qa_fig8.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
&config
notrace_passing = 0
ntestpart = 10000
num_surf = 1
sbeg = 0.6
npoiper2 = 128
netcdffile = 'wout_henneberg_qa.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .True.
cut_in_per = 0.5d0
fast_class = .True.
deterministic = .True.
/
14 changes: 14 additions & 0 deletions examples/classification/configs/qa_s03.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 1
sbeg = 0.3
npoiper2 = 128
netcdffile = 'wout_henneberg_qa.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .False.
fast_class = .True.
deterministic = .True.
/
14 changes: 14 additions & 0 deletions examples/classification/configs/qa_s06.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 1
sbeg = 0.6
npoiper2 = 128
netcdffile = 'wout_henneberg_qa.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .False.
fast_class = .True.
deterministic = .True.
/
15 changes: 15 additions & 0 deletions examples/classification/configs/qa_volume.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 0
sbeg = 0.2
npoiper2 = 128
netcdffile = 'wout_henneberg_qa.nc'
isw_field_type = 2
trace_time = 1.5d-2
tcut = 1d-2
class_plot = .True.
cut_in_per = 0d0
fast_class = .True.
deterministic = .True.
/
15 changes: 15 additions & 0 deletions examples/classification/configs/qh_fig8.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
&config
notrace_passing = 0
ntestpart = 10000
num_surf = 1
sbeg = 0.6
npoiper2 = 128
netcdffile = 'wout_qh_8_7.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .True.
cut_in_per = 0.5d0
fast_class = .True.
deterministic = .True.
/
14 changes: 14 additions & 0 deletions examples/classification/configs/qh_s03.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 1
sbeg = 0.3
npoiper2 = 128
netcdffile = 'wout_qh_8_7.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .False.
fast_class = .True.
deterministic = .True.
/
14 changes: 14 additions & 0 deletions examples/classification/configs/qh_s06.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 1
sbeg = 0.6
npoiper2 = 128
netcdffile = 'wout_qh_8_7.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .False.
fast_class = .True.
deterministic = .True.
/
15 changes: 15 additions & 0 deletions examples/classification/configs/qh_volume.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 0
sbeg = 0.2
npoiper2 = 128
netcdffile = 'wout_qh_8_7.nc'
isw_field_type = 2
trace_time = 1.5d-2
tcut = 1d-2
class_plot = .True.
cut_in_per = 0d0
fast_class = .True.
deterministic = .True.
/
15 changes: 15 additions & 0 deletions examples/classification/configs/qi_fig8.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
&config
notrace_passing = 0
ntestpart = 10000
num_surf = 1
sbeg = 0.6
npoiper2 = 128
netcdffile = 'wout_23_1900_fix_bdry.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .True.
cut_in_per = 0.5d0
fast_class = .True.
deterministic = .True.
/
14 changes: 14 additions & 0 deletions examples/classification/configs/qi_s03.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 1
sbeg = 0.3
npoiper2 = 128
netcdffile = 'wout_23_1900_fix_bdry.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .False.
fast_class = .True.
deterministic = .True.
/
14 changes: 14 additions & 0 deletions examples/classification/configs/qi_s06.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 1
sbeg = 0.6
npoiper2 = 128
netcdffile = 'wout_23_1900_fix_bdry.nc'
isw_field_type = 2
trace_time = 1.0d0
tcut = 1d-1
class_plot = .False.
fast_class = .True.
deterministic = .True.
/
15 changes: 15 additions & 0 deletions examples/classification/configs/qi_volume.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
&config
notrace_passing = 1
ntestpart = 100000
num_surf = 0
sbeg = 0.2
npoiper2 = 128
netcdffile = 'wout_23_1900_fix_bdry.nc'
isw_field_type = 2
trace_time = 1.5d-2
tcut = 1d-2
class_plot = .True.
cut_in_per = 0d0
fast_class = .True.
deterministic = .True.
/
Loading
Loading