Tree-cotree implicit condensation in Magnetostatics