Engineering analysis often involves the accurate numerical solution of boundary value problems in discrete form. Hierarchical quadtree (or octree) grid generation offers an efficient method for the spatial discretisation of arbitrary-shaped two- (or three-) dimensional domains. It consists of recursive algebraic splitting of sub-domains into quadrants (or cubes), leading to an ordered hierarchi...