mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-05 13:20:43 +08:00
Clean Plot grid code and add to documentation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user