Skip to content

Commit 0ae6235

Browse files
committed
Replaced set_counter by a method flip switches
1 parent ae684c2 commit 0ae6235

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pySDC/projects/PinTSimE/switch_estimator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def get_new_step_size(self, controller, S):
8383

8484
else:
8585
dt_switch = self.params.t_switch - L.time
86-
L.prob.set_counter()
86+
8787
self.log(
8888
f"Switch located at time {self.params.t_switch:.6f} inside tol={self.params.tol:.4f}", S
8989
)
@@ -99,6 +99,7 @@ def get_new_step_size(self, controller, S):
9999
value=self.params.t_switch,
100100
)
101101

102+
L.prob.flip_switches()
102103
self.params.switch_detected_step = True
103104

104105
dt_planned = L.status.dt_new if L.status.dt_new is not None else L.params.dt

0 commit comments

Comments
 (0)