Solving Variational Inequality (vectorial case): pb self.snes.setVariableBounds(lb, ub)
Dear firedrake users, I try to solve a variational inequality using snes-firedrake. I have two unknown functions say (theta,w) so the functionspace is Vh = MixedFunctionSpace([Th,Wh]) where Th = FunctionSpace(mesh, "Lagrange", 1) Wh = FunctionSpace(mesh, "Lagrange", 2) the inequality constraint concerns only $w$ I set : obstacle = Function(Vh.sub(1)).interpolate((Constant(-0.03))) upper = Function(Vh.sub(1)).interpolate(Constant(1e10)) *solver.solve(bounds=(obstacle, upper)) * but this line causes the following error: File "/Users/maths/Desktop/Firedrake/VI/Timoshenko-obs.py", line 64, in <module> solver.solve(bounds=(obstacle, upper)) File "petsc4py/PETSc/Log.pyx", line 188, in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func File "petsc4py/PETSc/Log.pyx", line 189, in petsc4py.PETSc.Log.EventDecorator.decorator.wrapped_func File "/Users/maths/firedrake/src/firedrake/firedrake/adjoint_utils/variational_solver.py", line 89, in wrapper out = solve(self, **kwargs) File "/Users/maths/firedrake/src/firedrake/firedrake/variational_solver.py", line 312, in solve self.snes.setVariableBounds(lb, ub) File "petsc4py/PETSc/SNES.pyx", line 1978, in petsc4py.PETSc.SNES.setVariableBounds petsc4py.PETSc.Error: error code 75 [0] SNESVISetVariableBounds() at /Users/maths/firedrake/src/petsc/src/snes/impls/vi/vi.c:424 [0] SNESVISetVariableBounds_VI() at /Users/maths/firedrake/src/petsc/src/snes/impls/vi/vi.c:443 [0] Arguments are incompatible [0] Incompatible vector lengths lower bound = 201 solution vector = 302 Hope that one can help me ... Best regards. Smail.
participants (1)
- 
                
                Smail Merabet