A Discrete Geometric Approach to solving 2D non-linear magnetostatic problems