  We model a tridimensional vortex system in a sample with square superficial
pinning in the top surface and obtain the ground state structures as a function
of the sample thickness. Using a simple Frenkel-Kontorova like model and no
adjustable parameters, we reproduce the experimental vortex configurations seen
in the bottom surface and their range of stability. We find three phases with
two transitions between them, including a continuous one from square to
distorted hexagonal structure and a discontinuous one from distorted hexagonal
to hexagonal structure.
