function [value, jacobian] = constr_ex1(x)
% EX1 evaluates a constraint  function for an example problem
%
     global PAR
     if PAR.flag == 'f' | PAR.flag == 'a'
         value = 2 -  x(:)'*x(:);
     end
%
     if PAR.flag == 'g' | PAR.flag == 'a'
          jacobian = -2* [ x(1)   x(2) ];
     end
