Starting from the Bardeen–Cooper–Schrieffer (BCS) free energy functional, we derive
the Ginzburg–Landau functional in the presence of a weak homogeneous
magnetic field. We also provide an asymptotic formula for the BCS critical
temperature as a function of the magnetic field. This extends the previous
works of Frank, Hainzl, Seiringer and Solovej (2012; 2016) to the case of
external magnetic fields with nonvanishing magnetic flux through the unit
cell.