From 7fa2c6685047e68c5eb6329421d62cc5880f893b Mon Sep 17 00:00:00 2001 From: Mike Anderson Date: Mon, 5 Aug 2024 10:12:23 -0700 Subject: [PATCH] fix init bug --- y3prediction/unstart.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/y3prediction/unstart.py b/y3prediction/unstart.py index 4c2e497..7e5c765 100644 --- a/y3prediction/unstart.py +++ b/y3prediction/unstart.py @@ -111,12 +111,10 @@ def __call__(self, dcoll, x_vec, eos, *, time=0.0): mass = eos.get_density(self._pres_bulk, self._temp_bulk, self._y_bulk) + zeros velocity = self._vel_bulk + mom = mass*velocity energy = mass*(eos.get_internal_energy(self._temp_bulk, self._y_bulk) + 0.5*np.dot(velocity, velocity)) - mom = mass*velocity - energy = (energy + np.dot(mom, mom)/(2.0*mass)) - return make_conserved( dim=self._dim, mass=mass,