rebound 5.2.0__tar.gz → 5.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. {rebound-5.2.0/rebound.egg-info → rebound-5.2.2}/PKG-INFO +2 -2
  2. {rebound-5.2.0 → rebound-5.2.2}/README.md +1 -1
  3. {rebound-5.2.0 → rebound-5.2.2}/pyproject.toml +1 -1
  4. {rebound-5.2.0 → rebound-5.2.2}/rebound/simulation.py +1 -1
  5. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_whfast512.py +32 -14
  6. {rebound-5.2.0 → rebound-5.2.2/rebound.egg-info}/PKG-INFO +2 -2
  7. {rebound-5.2.0 → rebound-5.2.2}/setup.py +8 -1
  8. {rebound-5.2.0 → rebound-5.2.2}/src/binarydata.c +6 -2
  9. {rebound-5.2.0 → rebound-5.2.2}/src/rebound.c +1 -1
  10. {rebound-5.2.0 → rebound-5.2.2}/LICENSE +0 -0
  11. {rebound-5.2.0 → rebound-5.2.2}/MANIFEST.in +0 -0
  12. {rebound-5.2.0 → rebound-5.2.2}/rebound/__init__.py +0 -0
  13. {rebound-5.2.0 → rebound-5.2.2}/rebound/binarydata_field_descriptor.py +0 -0
  14. {rebound-5.2.0 → rebound-5.2.2}/rebound/citations.py +0 -0
  15. {rebound-5.2.0 → rebound-5.2.2}/rebound/frequency_analysis.py +0 -0
  16. {rebound-5.2.0 → rebound-5.2.2}/rebound/horizons.py +0 -0
  17. {rebound-5.2.0 → rebound-5.2.2}/rebound/integrator.py +0 -0
  18. {rebound-5.2.0 → rebound-5.2.2}/rebound/ode.py +0 -0
  19. {rebound-5.2.0 → rebound-5.2.2}/rebound/orbit.py +0 -0
  20. {rebound-5.2.0 → rebound-5.2.2}/rebound/particle.py +0 -0
  21. {rebound-5.2.0 → rebound-5.2.2}/rebound/particles.py +0 -0
  22. {rebound-5.2.0 → rebound-5.2.2}/rebound/plotting.py +0 -0
  23. {rebound-5.2.0 → rebound-5.2.2}/rebound/rotation.py +0 -0
  24. {rebound-5.2.0 → rebound-5.2.2}/rebound/simulationarchive.py +0 -0
  25. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/__init__.py +0 -0
  26. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_additional_forces.py +0 -0
  27. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_binary_fields.py +0 -0
  28. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_boundary.py +0 -0
  29. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_bs.py +0 -0
  30. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_collisions.py +0 -0
  31. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_copy.py +0 -0
  32. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_data.py +0 -0
  33. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_eos.py +0 -0
  34. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_fpcontract.py +0 -0
  35. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_frequency_analysis.py +0 -0
  36. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_gravity.py +0 -0
  37. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_horizons.py +0 -0
  38. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_import.py +0 -0
  39. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_integrator.py +0 -0
  40. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_janus.py +0 -0
  41. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_leapfrog.py +0 -0
  42. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_megno.py +0 -0
  43. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_mercurius.py +0 -0
  44. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_modify_orbital_parameters.py +0 -0
  45. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_name.py +0 -0
  46. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_orbital_elements.py +0 -0
  47. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_particle.py +0 -0
  48. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_pickle.py +0 -0
  49. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_plotting.py +0 -0
  50. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_post_timestep_modifications.py +0 -0
  51. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_random.py +0 -0
  52. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_restart_mercurius.py +0 -0
  53. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_rotations.py +0 -0
  54. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_saba.py +0 -0
  55. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_serialize.py +0 -0
  56. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_server.py +0 -0
  57. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_shearingsheet.py +0 -0
  58. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_simulation.py +0 -0
  59. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_simulationarchive.py +0 -0
  60. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_simulationarchive_matrix.py +0 -0
  61. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_size_of_simulation.py +0 -0
  62. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_tponly_encounter.py +0 -0
  63. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_trace.py +0 -0
  64. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_trace_full_bs.py +0 -0
  65. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_trace_full_ias15.py +0 -0
  66. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_transformations.py +0 -0
  67. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_units.py +0 -0
  68. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_variational.py +0 -0
  69. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_whfast.py +0 -0
  70. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_whfast_advanced.py +0 -0
  71. {rebound-5.2.0 → rebound-5.2.2}/rebound/tests/test_whfast_testparticles.py +0 -0
  72. {rebound-5.2.0 → rebound-5.2.2}/rebound/tools.py +0 -0
  73. {rebound-5.2.0 → rebound-5.2.2}/rebound/units.py +0 -0
  74. {rebound-5.2.0 → rebound-5.2.2}/rebound/variation.py +0 -0
  75. {rebound-5.2.0 → rebound-5.2.2}/rebound/vectors.py +0 -0
  76. {rebound-5.2.0 → rebound-5.2.2}/rebound/widget.py +0 -0
  77. {rebound-5.2.0 → rebound-5.2.2}/rebound.egg-info/SOURCES.txt +0 -0
  78. {rebound-5.2.0 → rebound-5.2.2}/rebound.egg-info/dependency_links.txt +0 -0
  79. {rebound-5.2.0 → rebound-5.2.2}/rebound.egg-info/top_level.txt +0 -0
  80. {rebound-5.2.0 → rebound-5.2.2}/setup.cfg +0 -0
  81. {rebound-5.2.0 → rebound-5.2.2}/src/binarydata.h +0 -0
  82. {rebound-5.2.0 → rebound-5.2.2}/src/boundary.c +0 -0
  83. {rebound-5.2.0 → rebound-5.2.2}/src/boundary.h +0 -0
  84. {rebound-5.2.0 → rebound-5.2.2}/src/collision.c +0 -0
  85. {rebound-5.2.0 → rebound-5.2.2}/src/collision.h +0 -0
  86. {rebound-5.2.0 → rebound-5.2.2}/src/communication_mpi.c +0 -0
  87. {rebound-5.2.0 → rebound-5.2.2}/src/communication_mpi.h +0 -0
  88. {rebound-5.2.0 → rebound-5.2.2}/src/derivatives.c +0 -0
  89. {rebound-5.2.0 → rebound-5.2.2}/src/derivatives.h +0 -0
  90. {rebound-5.2.0 → rebound-5.2.2}/src/display.c +0 -0
  91. {rebound-5.2.0 → rebound-5.2.2}/src/display.h +0 -0
  92. {rebound-5.2.0 → rebound-5.2.2}/src/fmemopen.c +0 -0
  93. {rebound-5.2.0 → rebound-5.2.2}/src/fmemopen.h +0 -0
  94. {rebound-5.2.0 → rebound-5.2.2}/src/frequency_analysis.c +0 -0
  95. {rebound-5.2.0 → rebound-5.2.2}/src/frequency_analysis.h +0 -0
  96. {rebound-5.2.0 → rebound-5.2.2}/src/glad.c +0 -0
  97. {rebound-5.2.0 → rebound-5.2.2}/src/glad.h +0 -0
  98. {rebound-5.2.0 → rebound-5.2.2}/src/gravity.c +0 -0
  99. {rebound-5.2.0 → rebound-5.2.2}/src/gravity.h +0 -0
  100. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_bs.c +0 -0
  101. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_bs.h +0 -0
  102. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_eos.c +0 -0
  103. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_eos.h +0 -0
  104. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_ias15.c +0 -0
  105. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_ias15.h +0 -0
  106. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_janus.c +0 -0
  107. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_janus.h +0 -0
  108. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_leapfrog.c +0 -0
  109. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_leapfrog.h +0 -0
  110. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_mercurius.c +0 -0
  111. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_mercurius.h +0 -0
  112. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_saba.c +0 -0
  113. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_saba.h +0 -0
  114. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_sei.c +0 -0
  115. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_sei.h +0 -0
  116. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_trace.c +0 -0
  117. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_trace.h +0 -0
  118. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_whfast.c +0 -0
  119. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_whfast.h +0 -0
  120. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_whfast512.c +0 -0
  121. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_whfast512.h +0 -0
  122. {rebound-5.2.0 → rebound-5.2.2}/src/integrator_whfast512.s +0 -0
  123. {rebound-5.2.0 → rebound-5.2.2}/src/khrplatform.h +0 -0
  124. {rebound-5.2.0 → rebound-5.2.2}/src/output.c +0 -0
  125. {rebound-5.2.0 → rebound-5.2.2}/src/output.h +0 -0
  126. {rebound-5.2.0 → rebound-5.2.2}/src/particle.c +0 -0
  127. {rebound-5.2.0 → rebound-5.2.2}/src/particle.h +0 -0
  128. {rebound-5.2.0 → rebound-5.2.2}/src/rebound.h +0 -0
  129. {rebound-5.2.0 → rebound-5.2.2}/src/rebound_internal.h +0 -0
  130. {rebound-5.2.0 → rebound-5.2.2}/src/rotations.c +0 -0
  131. {rebound-5.2.0 → rebound-5.2.2}/src/rotations.h +0 -0
  132. {rebound-5.2.0 → rebound-5.2.2}/src/server.c +0 -0
  133. {rebound-5.2.0 → rebound-5.2.2}/src/server.h +0 -0
  134. {rebound-5.2.0 → rebound-5.2.2}/src/simplefont.h +0 -0
  135. {rebound-5.2.0 → rebound-5.2.2}/src/simulation.c +0 -0
  136. {rebound-5.2.0 → rebound-5.2.2}/src/simulation.h +0 -0
  137. {rebound-5.2.0 → rebound-5.2.2}/src/simulationarchive.c +0 -0
  138. {rebound-5.2.0 → rebound-5.2.2}/src/simulationarchive.h +0 -0
  139. {rebound-5.2.0 → rebound-5.2.2}/src/tools.c +0 -0
  140. {rebound-5.2.0 → rebound-5.2.2}/src/tools.h +0 -0
  141. {rebound-5.2.0 → rebound-5.2.2}/src/transformations.c +0 -0
  142. {rebound-5.2.0 → rebound-5.2.2}/src/transformations.h +0 -0
  143. {rebound-5.2.0 → rebound-5.2.2}/src/tree.c +0 -0
  144. {rebound-5.2.0 → rebound-5.2.2}/src/tree.h +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rebound
3
- Version: 5.2.0
3
+ Version: 5.2.2
4
4
  Summary: An open-source multi-purpose N-body code
5
5
  Author-email: Hanno Rein <hanno@hanno-rein.de>
6
6
  License-Expression: GPL-3.0-only
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Dynamic: license-file
19
19
 
20
- [![Version](https://img.shields.io/badge/rebound-v5.2.0-green.svg?style=flat)](https://rebound.hanno-rein.de)
20
+ [![Version](https://img.shields.io/badge/rebound-v5.2.2-green.svg?style=flat)](https://rebound.hanno-rein.de)
21
21
  [![PyPI](https://badge.fury.io/py/rebound.svg)](https://badge.fury.io/py/rebound)
22
22
  [![GPL](https://img.shields.io/badge/license-GPL-green.svg?style=flat)](https://github.com/hannorein/rebound/blob/main/LICENSE)
23
23
  [![Docs](https://img.shields.io/badge/Documentation-green.svg?style=flat)](https://rebound.hanno-rein.de/)
@@ -1,4 +1,4 @@
1
- [![Version](https://img.shields.io/badge/rebound-v5.2.0-green.svg?style=flat)](https://rebound.hanno-rein.de)
1
+ [![Version](https://img.shields.io/badge/rebound-v5.2.2-green.svg?style=flat)](https://rebound.hanno-rein.de)
2
2
  [![PyPI](https://badge.fury.io/py/rebound.svg)](https://badge.fury.io/py/rebound)
3
3
  [![GPL](https://img.shields.io/badge/license-GPL-green.svg?style=flat)](https://github.com/hannorein/rebound/blob/main/LICENSE)
4
4
  [![Docs](https://img.shields.io/badge/Documentation-green.svg?style=flat)](https://rebound.hanno-rein.de/)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rebound"
7
- version = "5.2.0"
7
+ version = "5.2.2"
8
8
  description = "An open-source multi-purpose N-body code"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  license = "GPL-3.0-only"
@@ -92,7 +92,7 @@ class Simulation(Structure):
92
92
 
93
93
  # Only allow attributes which are fields.
94
94
  # Exceptions are listed here. Used to keep reference for function pointers.
95
- __slots__ = ["_afp", "_colrfp", "_corfp", "_posttmp", "_pretmp", "_simulation_needsfree_", "_extras_ref"]
95
+ __slots__ = ["_afp", "_colrfp", "_corfp", "_hb", "_posttmp", "_pretmp", "_simulation_needsfree_", "_extras_ref"]
96
96
 
97
97
  def __new__(cls, *args, **kw):
98
98
  clibrebound.reb_simulation_create.restype = POINTER(Simulation)
@@ -19,14 +19,32 @@ def gr_potential(sim):
19
19
  return H
20
20
 
21
21
  class TestIntegratorWHFast512(unittest.TestCase):
22
+ def avx512_available(self):
23
+ if not rebound.avx512_available: return False
24
+ try:
25
+ sim = rebound.Simulation()
26
+ sim.add("solar system")
27
+ sim.integrator = "whfast512"
28
+ sim.dt = 6/365.25*2*math.pi
29
+ sim.exact_finish_time = 0
30
+ sim.integrator.concatenate_steps = 1
31
+ sim.steps(1)
32
+ except RuntimeError:
33
+ return False
34
+ return True
35
+
36
+
22
37
  def test_whfast512_avx512_available(self):
23
38
  if not rebound.avx512_available:
24
39
  print("\n::error:: AVX512 is not supported by this CPU. Cannot run WHFast512 unit tests.")
25
40
  else:
26
- print("\n::notice:: AVX512 is supported by this CPU. Running WHFast512 units tests.")
41
+ if not self.avx512_available():
42
+ print("\n::notice:: AVX512 should be available according to the C functio reb_avx512_available(), but a test simulation returns an error.")
43
+ else:
44
+ print("\n::notice:: AVX512 is supported by this CPU. Running WHFast512 units tests.")
27
45
 
28
46
  def test_whfast512_basic(self):
29
- if not rebound.avx512_available: return
47
+ if not self.avx512_available(): return
30
48
  sim = rebound.Simulation()
31
49
  sim.add("solar system")
32
50
  sim.integrator = "whfast512"
@@ -45,7 +63,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
45
63
  self.assertLess(math.fabs((e0-e1)/e0),2e-9)
46
64
 
47
65
  def test_whfast512_corrector(self):
48
- if not rebound.avx512_available: return
66
+ if not self.avx512_available(): return
49
67
  sim = rebound.Simulation()
50
68
  sim.add("solar system")
51
69
  sim.integrator = "whfast512"
@@ -63,7 +81,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
63
81
  self.assertLess(math.fabs((e0-e1)/e0),2e-12)
64
82
 
65
83
  def test_whfast512_gr(self):
66
- if not rebound.avx512_available: return
84
+ if not self.avx512_available(): return
67
85
  sim = rebound.Simulation()
68
86
  sim.add("solar system")
69
87
  sim.integrator = "whfast512"
@@ -83,7 +101,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
83
101
 
84
102
 
85
103
  def test_whfast512_fewer_than_8_particles(self):
86
- if not rebound.avx512_available: return
104
+ if not self.avx512_available(): return
87
105
  sim = rebound.Simulation()
88
106
  sim.add("outer solar system")
89
107
  sim.integrator = "whfast512"
@@ -102,7 +120,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
102
120
  self.assertLess(math.fabs((e0-e1)/e0),1e-11)
103
121
 
104
122
  def test_whfast512_independent_kepler_solvers(self):
105
- if not rebound.avx512_available: return
123
+ if not self.avx512_available(): return
106
124
  def getSim(innera):
107
125
  sim = rebound.Simulation()
108
126
  sim.add(m=1)
@@ -127,7 +145,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
127
145
 
128
146
 
129
147
  def test_whfast512_high_e_kepler_solver(self):
130
- if not rebound.avx512_available: return
148
+ if not self.avx512_available(): return
131
149
  def getSim(e, integrator, f):
132
150
  sim = rebound.Simulation()
133
151
  sim.add(m=1)
@@ -147,7 +165,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
147
165
  self.assertAlmostEqual(sim.particles[1].x, sim512.particles[1].x, 15)
148
166
 
149
167
  def test_whfast512_Nsystems_2(self):
150
- if not rebound.avx512_available: return
168
+ if not self.avx512_available(): return
151
169
  for Nplanets in [1,2,3,4]:
152
170
  def getSim(Nplanets):
153
171
  sim = rebound.Simulation()
@@ -186,7 +204,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
186
204
  self.assertEqual(sim.particles[1+i].vx, sim2.particles[2+Nplanets+i].vx)
187
205
 
188
206
  def test_whfast512_Nsystems_4(self):
189
- if not rebound.avx512_available: return
207
+ if not self.avx512_available(): return
190
208
  for Nplanets in [1,2]:
191
209
  def getSim(Nplanets):
192
210
  sim = rebound.Simulation()
@@ -228,7 +246,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
228
246
  self.assertEqual(sim.particles[1+i].vx, sim2.particles[4+3*Nplanets+i].vx)
229
247
 
230
248
  def test_whfast512_com(self):
231
- if not rebound.avx512_available: return
249
+ if not self.avx512_available(): return
232
250
  sim = rebound.Simulation()
233
251
  sim.add("solar system")
234
252
  for p in sim.particles:
@@ -249,7 +267,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
249
267
 
250
268
 
251
269
  def test_whfast512_restart(self):
252
- if not rebound.avx512_available: return
270
+ if not self.avx512_available(): return
253
271
  sim = rebound.Simulation()
254
272
  sim.add("solar system")
255
273
  sim.integrator = "whfast512"
@@ -272,7 +290,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
272
290
  self.assertEqual(sim.particles[i].vx, sim2.particles[i].vx)
273
291
 
274
292
  def test_whfast512_exit_min_distance(self):
275
- if not rebound.avx512_available: return
293
+ if not self.avx512_available(): return
276
294
  sim = rebound.Simulation()
277
295
  sim.add(m=1)
278
296
  sim.add(m=1e-8,a=1)
@@ -287,7 +305,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
287
305
  self.assertAlmostEqual(sim.t,11.456, 2)
288
306
 
289
307
  def test_whfast512_exit_min_distance_star(self):
290
- if not rebound.avx512_available: return
308
+ if not self.avx512_available(): return
291
309
  sim = rebound.Simulation()
292
310
  sim.add(m=1)
293
311
  sim.add(m=1e-8,a=1, e=0.9, f=math.pi)
@@ -301,7 +319,7 @@ class TestIntegratorWHFast512(unittest.TestCase):
301
319
  self.assertAlmostEqual(sim.t,2.99322, 2)
302
320
 
303
321
  def test_whfast512_exit_max_distance(self):
304
- if not rebound.avx512_available: return
322
+ if not self.avx512_available(): return
305
323
  sim = rebound.Simulation()
306
324
  sim.add(m=1)
307
325
  sim.add(m=1e-8,a=1, e=0.9, f=0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rebound
3
- Version: 5.2.0
3
+ Version: 5.2.2
4
4
  Summary: An open-source multi-purpose N-body code
5
5
  Author-email: Hanno Rein <hanno@hanno-rein.de>
6
6
  License-Expression: GPL-3.0-only
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
17
17
  License-File: LICENSE
18
18
  Dynamic: license-file
19
19
 
20
- [![Version](https://img.shields.io/badge/rebound-v5.2.0-green.svg?style=flat)](https://rebound.hanno-rein.de)
20
+ [![Version](https://img.shields.io/badge/rebound-v5.2.2-green.svg?style=flat)](https://rebound.hanno-rein.de)
21
21
  [![PyPI](https://badge.fury.io/py/rebound.svg)](https://badge.fury.io/py/rebound)
22
22
  [![GPL](https://img.shields.io/badge/license-GPL-green.svg?style=flat)](https://github.com/hannorein/rebound/blob/main/LICENSE)
23
23
  [![Docs](https://img.shields.io/badge/Documentation-green.svg?style=flat)](https://rebound.hanno-rein.de/)
@@ -21,6 +21,13 @@ def is_x86_64():
21
21
  if sys.platform == "win32":
22
22
  if not shutil.which("clang-cl"):
23
23
  return False
24
+ if sys.platform == "linux":
25
+ import platform
26
+ arch = platform.machine().lower()
27
+ if not ("x86" in arch or "amd64" in arch):
28
+ return False
29
+ if "arm" in arch or "aarch" in arch:
30
+ return False
24
31
  return struct.calcsize("P")*8 == 64
25
32
 
26
33
  ##### Git hash
@@ -28,7 +35,7 @@ try:
28
35
  ghash = subprocess.check_output(["git", "rev-parse", "HEAD"]).decode("ascii").strip()
29
36
  ghash_arg = f"-DGITHASH={ghash}"
30
37
  except Exception:
31
- ghash_arg = "-DGITHASH=93021857a3b7dea042430b2a282488db5799ac20" #GITHASHAUTOUPDATE
38
+ ghash_arg = "-DGITHASH=b06e3fcd9e50e2d9674f6f859ecd311091dd48b0" #GITHASHAUTOUPDATE
32
39
 
33
40
  ##### Link args
34
41
  extra_link_args = []
@@ -176,7 +176,9 @@ struct reb_binarydata_field_descriptor reb_binarydata_field_descriptor_for_name(
176
176
  struct reb_binarydata_field_descriptor fd_integrator = *fd;
177
177
  if (r && r->integrator.state){
178
178
  fd_integrator.offset += (size_t)r->integrator.state;
179
- fd_integrator.offset_N += (size_t)r->integrator.state;
179
+ if (fd_integrator.offset_N != SIZE_MAX){
180
+ fd_integrator.offset_N += (size_t)r->integrator.state;
181
+ }
180
182
  }
181
183
  strcpy(fd_integrator.name, name);
182
184
  return fd_integrator;
@@ -188,7 +190,9 @@ struct reb_binarydata_field_descriptor reb_binarydata_field_descriptor_for_name(
188
190
  struct reb_binarydata_field_descriptor fd_simulation = *fd;
189
191
  if (r){
190
192
  fd_simulation.offset += (size_t)r;
191
- fd_simulation.offset_N += (size_t)r;
193
+ if (fd_simulation.offset_N != SIZE_MAX){
194
+ fd_simulation.offset_N += (size_t)r;
195
+ }
192
196
  }
193
197
  return fd_simulation;
194
198
  }
@@ -40,7 +40,7 @@
40
40
  const uint32_t reb_string_size_max = REB_STRING_SIZE_MAX; // defined in rebound.h
41
41
  const size_t reb_messages_max_N = 10;
42
42
  const char* reb_build_str = __DATE__ " " __TIME__; // Date and time build string.
43
- const char* reb_version_str = "5.2.0"; // **VERSIONLINE** This line gets updated automatically. Do not edit manually.
43
+ const char* reb_version_str = "5.2.2"; // **VERSIONLINE** This line gets updated automatically. Do not edit manually.
44
44
  const char* reb_githash_str = STRINGIFY(GITHASH); // This line gets updated automatically. Do not edit manually.
45
45
 
46
46
  // NULL terminated list of custom registered integrators.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes