Skip to content

Commit

Permalink
#664 restore examples
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Oct 27, 2019
1 parent 2402649 commit a0ad975
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions examples/scripts/compare_lithium_ion.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# set mesh
var = pybamm.standard_spatial_vars
var_pts = {var.x_n: 50, var.x_s: 50, var.x_p: 50, var.r_n: 50, var.r_p: 50}
var_pts = {var.x_n: 10, var.x_s: 10, var.x_p: 10, var.r_n: 5, var.r_p: 5}

# discretise models
for model in models:
Expand All @@ -47,8 +47,7 @@
solutions = [None] * len(models)
t_eval = np.linspace(0, 0.17, 100)
for i, model in enumerate(models):
model.convert_to_format = "casadi"
solutions[i] = pybamm.CasadiSolver().solve(model, t_eval)
solutions[i] = model.default_solver.solve(model, t_eval)

# plot
plot = pybamm.QuickPlot(models, mesh, solutions)
Expand Down
1 change: 0 additions & 1 deletion examples/scripts/compare_lithium_ion_3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
solutions = [None] * len(models)
t_eval = np.linspace(0, 1, 1000)
for i, model in enumerate(models):
model.convert_to_format = "casadi"
solution = model.default_solver.solve(model, t_eval)
solutions[i] = solution

Expand Down

0 comments on commit a0ad975

Please sign in to comment.