Magnetostatic tailoring of coercive forces