Clean Plot grid code and add to documentation

This commit is contained in:
rowanc1
2014-03-03 15:50:06 -08:00
parent eeae3ec783
commit 48e506f4bb
6 changed files with 128 additions and 120 deletions
+17
View File
@@ -21,7 +21,24 @@ Each mesh code follows the guiding principles that are present in this
tutorial, but the details, advantages and disadvantages differ between
the implementations.
.. plot::
from SimPEG import Mesh, Utils, np
import matplotlib.pyplot as plt
sz = [10,10]
tM = Mesh.TensorMesh(sz)
qM = Mesh.TreeMesh(sz)
qM.refine(lambda X: 1 if np.sqrt(((X-0.5)**2).sum()) < 0.3 else 0)
rM = Mesh.LogicallyRectMesh(Utils.meshutils.exampleLrmGrid(sz,'rotate'))
fig, axes = plt.subplots(1,3,figsize=(14,5))
opts = {}
tM.plotGrid(ax=axes[0], **opts)
axes[0].set_title('TensorMesh')
qM.plotGrid(ax=axes[1], **opts)
axes[1].set_title('TreeMesh')
rM.plotGrid(ax=axes[2], **opts)
axes[2].set_title('LogicallyRectMesh')
Variable Locations and Terminology
+9 -9
View File
@@ -9,15 +9,6 @@ Tensor Mesh
:undoc-members:
Cylindrical 1D Mesh
===================
.. automodule:: SimPEG.Mesh.Cyl1DMesh
:show-inheritance:
:members:
:undoc-members:
Logically Rectangular Mesh
==========================
@@ -27,6 +18,15 @@ Logically Rectangular Mesh
:undoc-members:
Cylindrical 1D Mesh
===================
.. automodule:: SimPEG.Mesh.Cyl1DMesh
:show-inheritance:
:members:
:undoc-members:
Base Mesh
=========