Ampere's Circuital 3-D Model for Noncuboidal Magnets