Skip to content

Commit 3505057

Browse files
change success to final time
1 parent dad2b10 commit 3505057

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

pybamm/solvers/algebraic_solver.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ def jac_norm(y):
234234
y_diff = np.r_[[y0_diff] * len(t_eval)].T
235235
y_sol = np.r_[y_diff, y_alg]
236236
# Return solution object (no events, so pass None to t_event, y_event)
237-
sol = pybamm.Solution(t_eval, y_sol, model, inputs_dict, termination="success")
237+
sol = pybamm.Solution(
238+
t_eval, y_sol, model, inputs_dict, termination="final time"
239+
)
238240
sol.integration_time = integration_time
239241
return sol

pybamm/solvers/base_solver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,8 +1302,6 @@ def get_termination_reason(self, solution, events):
13021302

13031303
pybamm.logger.debug("Finish post-processing events")
13041304
return solution, solution.termination
1305-
elif solution.termination == "success":
1306-
return solution, solution.termination
13071305

13081306
def check_extrapolation(self, solution, events):
13091307
"""

pybamm/solvers/casadi_algebraic_solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def _integrate(self, model, t_eval, inputs_dict=None):
174174
y_sol,
175175
model,
176176
inputs_dict,
177-
termination="success",
177+
termination="final time",
178178
sensitivities=explicit_sensitivities,
179179
)
180180
sol.integration_time = integration_time

pybamm/solvers/solution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def first_state(self):
383383
self.all_inputs[:1],
384384
None,
385385
None,
386-
"success",
386+
"final time",
387387
)
388388
new_sol._all_inputs_casadi = self.all_inputs_casadi[:1]
389389
new_sol._sub_solutions = self.sub_solutions[:1]

0 commit comments

Comments
 (0)