Hi, I would like to use SNES solver to solute the problem, and I have learned Set bounds in a NonLinearProblem, Set limits to the solution function, dolfinx/python/test/unit/fem/test_nonlinear_assembler.py at 160ed13eb476df99944072aec70bd46a6fcb9bcf · FEniCS/dolfinx · GitHub and dolfinx/python/test/unit/fem/test_nonlinear_assembler.py at 8140591d980ba4e0705588999294e37704c96186 · FEniCS/dolfinx · GitHub.
However, when I want to set bounds for SNES solver, the dolfinx.fem.Function.vector
has lost.
d_min, d_max = d.copy(), d.copy()
d_min.x.array[:] = 0
d_max.x.array[:] = 1
solver_d = PETSc.SNES().create(MPI.COMM_WORLD)
solver_d.setVariableBounds(d_min.vector, d_max.vector)
Thank you!