Space

Simple interaction model with several bodies.

module:

space

author:

Le Bars, Yoann

This file is part of the pure Python benchmark.

This Python benchmark is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This Python benchmark is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The file LICENSE is a copy of the GNU General Public License. You can also see it on https://www.gnu.org/licenses/.

class space.Space(n: int, dens: float, dt: float, G: float = 6.6743e-11, epsilon: float = 1e-06)

Class describing a space in which move several bodies.

Parameters:
  • __dt (float) – Time step (in s).

  • __G (float) – Universal gravity constant (in m³ / kg /s²).

  • __epsilon (float) – Numerical precision.

  • bodies (list) – Bodies list.

compute_dynamics() None

Compute new time step configuration.