Design of Rare-Earth Permanent Magnets (REPM) and Magnetic Circuits