mirror of
https://codeberg.org/Yael-II/MSc2-Project-Chaos.git
synced 2026-03-15 04:16:26 +01:00
scripts
This commit is contained in:
Binary file not shown.
Binary file not shown.
24
README.md
24
README.md
@@ -30,10 +30,22 @@ chmod u+x *.sh
|
|||||||
|
|
||||||
## Usage
|
## 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.
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ def compute_poincare_sections_linear(E: float,
|
|||||||
W_part = W_all_part[:,:,i]
|
W_part = W_all_part[:,:,i]
|
||||||
|
|
||||||
# Perform integration
|
# 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
|
# Extract positions and velocities
|
||||||
x_part = coord_part[:, 0, 0]
|
x_part = coord_part[:, 0, 0]
|
||||||
|
|||||||
0
activate.sh
Normal file → Executable file
0
activate.sh
Normal file → Executable file
1
area.sh
1
area.sh
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source activate.sh
|
||||||
venv/bin/python Source/main_area.py
|
venv/bin/python Source/main_area.py
|
||||||
venv/bin/python Source/plot_area.py
|
venv/bin/python Source/plot_area.py
|
||||||
|
|||||||
5
poincare_sections.sh
Executable file
5
poincare_sections.sh
Executable 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
5
poincare_sections_linear.sh
Executable 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
4
test_evoluion.sh
Executable 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
4
test_initial_E.sh
Executable 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
4
test_potentials.sh
Executable 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
4
time_poincare_sections.sh
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source activate.sh
|
||||||
|
venv/bin/python Source/time_poincare_sections.py
|
||||||
Reference in New Issue
Block a user