Performance improvements to dual mesh creation. Continuous locking / unlocking of variables makes the code scale quite badly, another method is needed.