Minimal solutions of variational problems on a torus