Skip to content

Commit

Permalink
Update test_semilinear1d_nonconstant_bounds.py
Browse files Browse the repository at this point in the history
  • Loading branch information
milzj committed Feb 17, 2024
1 parent 7bb305f commit e9facbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/algorithms/test_semilinear1d_nonconstant_bounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def solve_problem(n, n_ref, u_init=None, maxiter=1000, gtol=1e-15, ftol=-np.inf
u_vec = u.vector()[:]
lb_vec = project(lb, U).vector()[:]
ub_vec = project(ub, U).vector()[:]
u_vec = np.clip(u_vec, lb_vec, ub_vec)
w_vec = np.clip(u_vec, -beta, beta)
u_vec = np.clip(u_vec-w_vec, lb_vec, ub_vec)
u.vector()[:] = u_vec

y = Function(V)
Expand Down

0 comments on commit e9facbd

Please sign in to comment.