  In superconductors with strong coupling between superconductivity and
elasticity manifested in a strong dependence of transition temperature on
pressure, there is an additional contribution to inter-vortex interactions due
to the strain field generated by vortices. When vortex lines are along the $c$
axis of a tetragonal crystal, a square vortex lattice (VL) is favored at low
vortex densities, because the vortex-induced strains contribution to the
inter-vortex interactions is long range. At intermediate magnetic fields, the
triangular lattice is stabilized. The triangular lattice evolves to the square
lattice upon increasing magnetic field, and eventually the system locks to the
square structure. We argue, however, that as $B$ approaches $H_{c2}$ the
elastic inter-vortex interactions disappear faster than the standard London
interactions, so that VL should return to the triangular structure. Our results
are compared to VLs observed in the heavy fermion superconductor
$\mathrm{CeCoIn_5}$.
