Skip to content

Commit

Permalink
fix _integrator_F as FCallable
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Jan 12, 2024
1 parent 8565d80 commit 187c80a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/galax/potential/_potential/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ def tidal_tensor(
# Integrating orbits

@partial_jit()
def _integrator_F(self, t: FloatScalar, xv: Vec6, args: tuple[Any, ...]) -> Vec6:
return xp.hstack([xv[3:6], self.acceleration(xv[0:3], t)]) # v, a
def _integrator_F(self, t: FloatScalar, qp: Vec6, args: tuple[Any, ...]) -> Vec6:
return xp.hstack([qp[3:6], self.acceleration(qp[0:3], t)]) # v, a

@partial_jit(static_argnames=("integrator"))
def integrate_orbit(
Expand All @@ -307,5 +307,5 @@ def integrate_orbit(

integrator_ = default_integrator if integrator is None else replace(integrator)

ws = integrator_.run(self._integrator_F, qp0, t0, t1, ts) # type: ignore[arg-type]
ws = integrator_.run(self._integrator_F, qp0, t0, t1, ts)
return Orbit(q=ws[:, :3], p=ws[:, 3:-1], t=ws[:, -1], potential=self)

0 comments on commit 187c80a

Please sign in to comment.