Solution of the vector wave equation using a Krylov solver with an algebraic multigrid approximated preconditioner