Skip to content

Commit

Permalink
python tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
darioizzo committed Jul 9, 2024
1 parent 818e80e commit 8dcf172
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cascade.py/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_kepler_equivalence(self):
def test_perturbation_magnitudes(self):
from .dynamics import simple_earth, kepler
import numpy as np
from heyoka import make_cfunc
from heyoka import cfunc, make_vars

dynkep = simple_earth(
J2=False,
Expand Down Expand Up @@ -90,9 +90,11 @@ def test_perturbation_magnitudes(self):
drag=False,
)

dynkep_c = make_cfunc([dynkep[i][1] for i in [3, 4, 5]])
dynJ2_c = make_cfunc([dynJ2[i][1] for i in [3, 4, 5]])
dynJ3_c = make_cfunc([dynJ3[i][1] for i in [3, 4, 5]])
# Dynamical variables.
x, y, z, vx, vy, vz = make_vars("x", "y", "z", "vx", "vy", "vz")
dynkep_c = cfunc([dynkep[i][1] for i in [3, 4, 5]], vars=[x,y,z])
dynJ2_c = cfunc([dynJ2[i][1] for i in [3, 4, 5]], vars=[x,y,z])
dynJ3_c = cfunc([dynJ3[i][1] for i in [3, 4, 5]], vars=[x,y,z])

# We compute the various acceleration magnitudes at 7000 km
pos = np.array([7000000.0, 0.0, 0.0])
Expand Down

0 comments on commit 8dcf172

Please sign in to comment.