mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-02 13:00:17 +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
|
||||
|
||||
@@ -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
|
||||
=========
|
||||
|
||||
|
||||
Reference in New Issue
Block a user