Tools for calculating the energy and simulating dipole mediated domains.