Skip to content

Commit e9facbd

Browse files
authored
Update test_semilinear1d_nonconstant_bounds.py
1 parent 7bb305f commit e9facbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/algorithms/test_semilinear1d_nonconstant_bounds.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ def solve_problem(n, n_ref, u_init=None, maxiter=1000, gtol=1e-15, ftol=-np.inf
110110
u_vec = u.vector()[:]
111111
lb_vec = project(lb, U).vector()[:]
112112
ub_vec = project(ub, U).vector()[:]
113-
u_vec = np.clip(u_vec, lb_vec, ub_vec)
113+
w_vec = np.clip(u_vec, -beta, beta)
114+
u_vec = np.clip(u_vec-w_vec, lb_vec, ub_vec)
114115
u.vector()[:] = u_vec
115116

116117
y = Function(V)

0 commit comments

Comments
 (0)