The ability to have a good understanding of and to manipulate electromagnetic fields has been increasingly important for many hardware technologies. There is a strong need for advanced numeric algorithms that yield fast and accuracy-controllable solvers for electromagnetic and micromagnetic simulations. The first part of the dissertation presents methods constituting the core of the high-performance simulator FastMag. FastMag derives its high speed from three aspects. First, it leverages the state-of-the-art graphics processing unit computational architectures, which can be hundreds of times faster than a single central processing unit. Moreover, efficient and accurate implementations of numeric quadrature was invoked. Thirdly, we provide an analytic method for Jacobian-vector products. Some advanced features are provided in FastMag. Quadratic basis functions are used to provide better accuracy. Hexahedral elements were also implemented because they are more accurate, consume less memory. The second part of the dissertation is devoted to electromagnetic scattering problems. We developed new algorithms that significantly improved the traditional methods. First of all, potential volume integral equations were implemented, where the potential quantities (vector and scalar potential). Another important contribution of this dissertation is quadrilateral barycentric basis functions (QBBFs). The QBBFs can serve as a fundamental block for primary basis functions (PBFs) and dual basis functions (DBFs). The PBFs and DBFs, when applied in combination into traditional electric and magnetic field integral equations (EFIE and MFIE), give rise to accurate and robust results. Moreover, the DBFs make the famous Calderon preconditioner multiplicative