Skip to content

Commit b732dbc

Browse files
committed
doc + pep8 fixes
1 parent 5cf10a3 commit b732dbc

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Full code: `pySDC/projects/Hamiltonian/solar_system.py <https://github.com/Parallel-in-Time/pySDC/blob/master/pySDC/projects/Hamiltonian/solar_system.py>`_
2+
3+
.. literalinclude:: ../../../pySDC/projects/Hamiltonian/solar_system.py
4+
5+
Results:
6+
7+
.. image:: ../../../data/outer_solar_system_hamiltonian.png
8+
:scale: 50 %

pySDC/implementations/problem_classes/OuterSolarSystem.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,18 @@ def u_exact(self, t):
6969
me = particles(self.init)
7070

7171
me.pos.values[:, 0] = [0.0, 0.0, 0.0]
72-
me.pos.values[:, 1] = [-3.5025653,-3.8169847,-1.5507963]
73-
me.pos.values[:, 2] = [9.0755314,-3.0458353,-1.6483708]
74-
me.pos.values[:, 3] = [8.3101420,-16.2901086,-7.2521278]
75-
me.pos.values[:, 4] = [11.4707666,-25.7294829,-10.8169456]
76-
me.pos.values[:, 5] = [-15.5387357,-25.2225594,-3.1902382]
72+
me.pos.values[:, 1] = [-3.5025653, -3.8169847, -1.5507963]
73+
me.pos.values[:, 2] = [9.0755314, -3.0458353, -1.6483708]
74+
me.pos.values[:, 3] = [8.3101420, -16.2901086, -7.2521278]
75+
me.pos.values[:, 4] = [11.4707666, -25.7294829, -10.8169456]
76+
me.pos.values[:, 5] = [-15.5387357, -25.2225594, -3.1902382]
7777

7878
me.vel.values[:, 0] = [0.0, 0.0, 0.0]
79-
me.vel.values[:, 1] = [0.00565429,-0.00412490,-0.00190589]
79+
me.vel.values[:, 1] = [0.00565429, -0.00412490, -0.00190589]
8080
me.vel.values[:, 2] = [0.00168318, 0.00483525, 0.00192462]
8181
me.vel.values[:, 3] = [0.00354178, 0.00137102, 0.00055029]
8282
me.vel.values[:, 4] = [0.00288930, 0.00114527, 0.00039677]
83-
me.vel.values[:, 5] = [0.00276725, -0.0017072,-0.00136504]
83+
me.vel.values[:, 5] = [0.00276725, -0.0017072, -0.00136504]
8484

8585
me.m[0] = 1.00000597682
8686
me.m[1] = 0.000954786104043

pySDC/projects/Hamiltonian/README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ We first test the integrator for some rather simple problems, namely the harmoni
1111
For both problems we make use of the hook ``hamiltonian_output`` to monitor the deviation from the exact Hamiltonian.
1212

1313
.. include:: doc_hamiltonian_simple.rst
14+
15+
Solar system problem
16+
--------------------
17+
18+
In this slightly more complex setup we simulate the movement of planets in the outer solar system.
19+
For this, only six planets are modeled, namely the Sun (which in its mass contains the inner planets), Jupiter, Saturn, Uranus, Neptune and Pluto.
20+
The gravitational forces are computed using a simple N^2 solver.
21+
All this is implemented within the ``OuterSolarSystem`` problem class.
22+
23+
.. include:: doc_solar_system.rst

0 commit comments

Comments
 (0)