This commit is contained in:
Yael-II
2025-01-20 16:36:27 +01:00
parent 1584426c17
commit 2359d0e754
12 changed files with 46 additions and 7 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -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.

View File

@@ -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]

0
activate.sh Normal file → Executable file
View File

View File

@@ -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

5
poincare_sections.sh Executable file
View File

@@ -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

5
poincare_sections_linear.sh Executable file
View File

@@ -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

4
test_evoluion.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
source activate.sh
venv/bin/python Source/test_evolution.py

4
test_initial_E.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
source activate.sh
venv/bin/python Source/test_initial_E.py

4
test_potentials.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
source activate.sh
venv/bin/python Source/test_potentials.py

4
time_poincare_sections.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/usr/bin/env bash
source activate.sh
venv/bin/python Source/time_poincare_sections.py