"""Unit tests for the TAOLinearBoundSolver interface""" # Copyright (C) 2013 Corrado Maurini # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # DOLFIN is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with DOLFIN. If not, see . # # First added: 03/09/2012 # Last changed: 2013-04-04 # Begin demo # Corrado Maurini # # This example solve the bound constrained minimization problem # in the domain (x,y) in [0,Lx]x[0,Ly] # # min F(u) with 0<=u<=1 and u(0,y)= 0, u(Lx,y) = 1 # # where F(u) is the quadratic functionaldefined by the form # # F(u) = 3./4.*(ell/2.*inner(grad(u), grad(u))+ 2./ell*usol)*dx # # An analytical is available: # u(x,y) = 0 for 0