Added additional parameters instead of hard coding thickness of the
magnet wall