Topological Methods for the Anal ysis of Solar Magnetic Fields