Characterization of wetting using topological principles.