Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sign of demagnetizing energy in the right place
The previous commit changed the sign of the contribution of the volume charges to the demagnetizing energy. It turns out the sign within the expression was right to begin with. However, it relied on Tet::interpolation(), which had the wrong sign. This error did not affect the magnetization dynamics because that particular overload of Tet::interpolation() is only used to compute the demagnetizing energy. For sanity's sake, use the right sign in both places.
- Loading branch information