#2260 add a helper function for load balance.

git-svn-id: https://chaste.cs.ox.ac.uk/svn/chaste/trunk@19178 b5f69653-2bf5-0310-8201-b0dafb8e1405
#2260 remove `Debug` and try to make algorithm a bit more readable

git-svn-id: https://chaste.cs.ox.ac.uk/svn/chaste/trunk@19179 b5f69653-2bf5-0310-8201-b0dafb8e1405