diff --git a/Figs/pcs_linear.pdf b/Figs/pcs_linear.pdf index 3f97c33..163f9b4 100644 Binary files a/Figs/pcs_linear.pdf and b/Figs/pcs_linear.pdf differ diff --git a/Figs/pcs_parallel.pdf b/Figs/pcs_parallel.pdf index b339961..fb7cb90 100644 Binary files a/Figs/pcs_parallel.pdf and b/Figs/pcs_parallel.pdf differ diff --git a/README.md b/README.md index 2582ea5..ef8d7f0 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,22 @@ chmod u+x *.sh ## Usage -## +1. To compute the Poincaré sections, run: +```bash +./poincare_sections.sh +``` +and then, enter `P` to plot only the "Parallel" output. Alternatively, to run the linear algorithm (without parallel array computing; much more slower), use: +``` +./poincare_sections_linear.sh +``` +The result of the simulations are saved in the Output directory, with the prefix `poincare_section_parallel_` or `poincare_section_linear_` followed by `1/E` (e.g. `12` for `E = 1/12`). The ASCII file contains all the Poincare section points (y on the first line, v on the second line) separated by blank spaces. +2. To compute the area above and below the critical squared phase--space distance, use: +``` +./area.sh +``` +3. To run the tests, use + - `./test_potentials.sh` to test the potentials; + - `./test_evolution.sh` to test the evolution of a particle in a HH potential; + - `./test_initial_E.sh` to test the generation of particles in this potential with a given energy; + - `./time_poincare_sections.sh` to get the running time of both Poincaré sections computations (parallel vs. linear algorithms). -## Main Poincaré Sections (Linear and Parallel) - -... - -The result of the simulation is saved in the Output directory, with the prefix `poincare_section_linear_` followed by 1/E (e.g. 12 for E = 1/12). The ASCII file contains all the Poincare section points (y on the first line, v on the second line) separated by blank spaces. diff --git a/Source/main_poincare_sections_linear.py b/Source/main_poincare_sections_linear.py index 9b2eacd..de63814 100644 --- a/Source/main_poincare_sections_linear.py +++ b/Source/main_poincare_sections_linear.py @@ -73,7 +73,7 @@ def compute_poincare_sections_linear(E: float, W_part = W_all_part[:,:,i] # Perform integration - t_part, coord_part = itg.rk4(0, W_part, h, N_inter, pot.hh_evolution) + t_part, coord_part = itg.rk4(0, W_part, h, N_iter, pot.hh_evolution) # Extract positions and velocities x_part = coord_part[:, 0, 0] diff --git a/activate.sh b/activate.sh old mode 100644 new mode 100755 diff --git a/area.sh b/area.sh index b918703..2006f36 100755 --- a/area.sh +++ b/area.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +source activate.sh venv/bin/python Source/main_area.py venv/bin/python Source/plot_area.py diff --git a/poincare_sections.sh b/poincare_sections.sh new file mode 100755 index 0000000..4196dea --- /dev/null +++ b/poincare_sections.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +source activate.sh +venv/bin/python Source/main_poincare_sections_parallel.py +venv/bin/python Source/plot_poincare_sections.py diff --git a/poincare_sections_linear.sh b/poincare_sections_linear.sh new file mode 100755 index 0000000..bba6973 --- /dev/null +++ b/poincare_sections_linear.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +source activate.sh +venv/bin/python Source/main_poincare_sections_linear.py +venv/bin/python Source/plot_poincare_sections.py diff --git a/test_evoluion.sh b/test_evoluion.sh new file mode 100755 index 0000000..8216bed --- /dev/null +++ b/test_evoluion.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +source activate.sh +venv/bin/python Source/test_evolution.py diff --git a/test_initial_E.sh b/test_initial_E.sh new file mode 100755 index 0000000..4d6b192 --- /dev/null +++ b/test_initial_E.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +source activate.sh +venv/bin/python Source/test_initial_E.py diff --git a/test_potentials.sh b/test_potentials.sh new file mode 100755 index 0000000..7a1496f --- /dev/null +++ b/test_potentials.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +source activate.sh +venv/bin/python Source/test_potentials.py diff --git a/time_poincare_sections.sh b/time_poincare_sections.sh new file mode 100755 index 0000000..685d20c --- /dev/null +++ b/time_poincare_sections.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +source activate.sh +venv/bin/python Source/time_poincare_sections.py