Frequency-Domain solver of Maxwell's equations in 2D