A finite element approach to shape optimization in a 2D frictionless c
ontact problem for two different cost functions is presented in this w
ork. The goal is to find an appropriate shape for the contact boundary
, performing an almost constant contact-stress distribution. The whole
formulation, including the mathematical model for the unilateral prob
lem, sensitivity analysis and geometry definition is treated in a cont
inuous form, independently of the discretization in finite elements. S
hape optimization is performed by a direct modification of the geometr
y through B-spline curves and an automatic mesh generator is used at e
ach new configuration to provide the finite element input data. Augmen
ted-Lagrangian techniques (to solve the contact problem) and an interi
or-point mathematical-programming algorithm (for shape optimization) a
re used to obtain numerical results.