|
15 | 15 | :linenos: |
16 | 16 | :start-after: example-st\u0061rt |
17 | 17 | :dedent: 1 |
18 | | - :emphasize-lines: 9, 10, 15, 20, 21, 24 |
| 18 | + :emphasize-lines: 11, 12, 17, 22, 23, 26 |
19 | 19 |
|
20 | 20 | Explanation of selected features and choices: |
21 | 21 |
|
22 | | -* Line 9 is just a quick way to generate the network described above. For more complex networks, you will either have to write more complex function or use dedicated modules. (In fact this example was chosen such that the network creation is very simple.) |
| 22 | +* Line 11 is just a quick way to generate the network described above. For more complex networks, you will either have to write more complex function or use dedicated modules. (In fact this example was chosen such that the network creation is very simple.) |
23 | 23 |
|
24 | | -* The values of :math:`τ` are initialised globally (line 10). We should not just define a function here, because if we were trying to calculate Lyapunov exponents or the Jacobian, the generator function would be called multiple times, and thus the value of the parameter would not be consistent (which would be disastrous). |
| 24 | +* The values of :math:`τ` are initialised globally (line 12). We should not just define a function here, because if we were trying to calculate Lyapunov exponents or the Jacobian, the generator function would be called multiple times, and thus the value of the parameter would not be consistent (which would be disastrous). |
25 | 25 |
|
26 | | -* In line 15, we use `symengine.sin` – in contrast to `math.sin` or `numpy.sin`. |
| 26 | +* In line 17, we use `symengine.sin` – in contrast to `math.sin` or `numpy.sin`. |
27 | 27 |
|
28 | | -* In line 20, we explicitly specify the delays to speed things up a little. |
| 28 | +* In line 22, we explicitly specify the delays to speed things up a little. |
29 | 29 |
|
30 | | -* In line 21, we explicitly use absolute instead of relative errors, as the latter make no sense for Kuramoto oscillators. |
| 30 | +* In line 23, we explicitly use absolute instead of relative errors, as the latter make no sense for Kuramoto oscillators. |
31 | 31 |
|
32 | | -* In line 24, we integrate blindly with a maximum time step of 0.1 up to the maximal delay to ensure that initial discontinuities have smoothened out. |
| 32 | +* In line 26, we integrate blindly with a maximum time step of 0.1 up to the maximal delay to ensure that initial discontinuities have smoothened out. |
33 | 33 | """ |
34 | 34 |
|
35 | 35 | if __name__ == "__main__": |
|
39 | 39 |
|
40 | 40 | from jitcdde import jitcdde, t, y |
41 | 41 |
|
42 | | - |
43 | 42 | rng = np.random.default_rng(seed=42) |
44 | 43 | n = 100 |
45 | 44 | ω = 1 |
|
0 commit comments