This work introduces an algorithm designed to solve the Bogoliubov–de Gennes equations of superconductivity theory. What sets this algorithm apart is its remarkable ability to precisely and consistently consider the impact of an external magnetic field, all within the microscopic approach. The computation scheme’s convergence is guaranteed by addressing the Biot–Savart equation for the field where the vector potential appears on both of its sides. To showcase the capabilities of this approach, we provide several key examples: the Abrikosov lattice, vortex core states, and the vortex structure in the intermediate mixed state of a superconductor. This method promises to offer valuable insights into the microscopic physics of intertype superconductivity.