The Barnes-Hut Hierarchical Force-calculation Algorithm