  Finite-element simulations of magnetostatic fields are performed in terms of
magnetic vector and total scalar potentials and compared for purpose of
modeling the accelerator magnets. The potentials represent the unknown
variables associated with the A and V formulations of magnetostatics to
describe the magnetic fields. The simulations are carried out with a single
software package, the COMSOL Multiphysics, where both formulations are
implemented. The numerical performance of these methods is illustrated with the
model example of a superconducting dipole magnet recently developed for
operation in the isochronous cyclotron SC200. The results of calculations are
analyzed and compared in terms of the relevant FEM parameters accounting for
performance of computation as well as the computational cost. We show in
particular that the use of scalar potential as compared to its vector
counterpart substantially reduces the number of degrees of freedom, the usage
of computer memory and the computational time for a similar relative error.
