diff --git a/hydrogym/core.py b/hydrogym/core.py index 62569ce..22268e4 100644 --- a/hydrogym/core.py +++ b/hydrogym/core.py @@ -315,7 +315,7 @@ def step(self, iter: int, control: Iterable[float] = None, **kwargs): """ raise NotImplementedError - def reset(self, t=0.0): + def reset(self): """Reset variables for the timestepper""" pass @@ -389,7 +389,7 @@ def check_complete(self): def reset(self, t=0.0) -> Union[ArrayLike, Tuple[ArrayLike, dict]]: self.iter = 0 self.flow.reset(q0=self.q0, t=t) - self.solver.reset(t=t) + self.solver.reset() return self.flow.get_observations() diff --git a/test/test_cyl.py b/test/test_cyl.py index e41fca4..d7ae43d 100644 --- a/test/test_cyl.py +++ b/test/test_cyl.py @@ -89,6 +89,9 @@ def test_env(): "mesh": "medium", }, "solver": hgym.SemiImplicitBDF, + "solver_config": { + "dt": 1e-2, + }, } env = hgym.FlowEnv(env_config) @@ -97,6 +100,8 @@ def test_env(): y, reward, done, info = env.step(u) u = feedback_ctrl(y) + env.reset() + def test_linearize(): flow = hgym.Cylinder(mesh="medium")