simpeg/simpeg — pull request #49 by rowanc1 (2014-02-12 17:21:42+00:00)
Title: Quadtree and OcTree

OcTrees and QuadTrees for SimPEG!
```
M = Mesh.TreeMesh([10,30])
def function(xyz):
for i in range(3):
if np.abs(sin(xyz[0]*np.pi*2)*0.5 + 0.5 - xyz[1]) < 0.2*i:
return 3-i
return 0
M.refine(function)
```
![quadtree 2014-02-12 09-14-44](https://f.cloud.github.com/assets/913249/2151225/2bb4b3e4-9409-11e3-997b-5632a46408e6.png)

The operators that you now have access to:
```
M.faceDiv
M.nodalGrad
M.edgeCurl
```
The operators are lightly tested against TensorMesh, but seem to be working as expected when refinements take place.

Speed and memory optimizations will happen in due course, but I think it would be good to play with this in the develop branch.