It should be possible to generate quadtree and octtree implementations from a common template as in the `jtensors` package.