Files
simpeg/docs/examples/mesh/plot_TensorMesh.py
T
2013-09-30 14:53:22 -07:00

22 lines
401 B
Python

import numpy as np
import matplotlib.pyplot as plt
from SimPEG import TensorMesh
pad = 7
padfactor = 1.4
xpad = (np.ones(pad)*padfactor)**np.arange(pad)
ypad = (np.ones(pad)*padfactor)**np.arange(pad)
core = 15
xcore = np.ones(core)
ycore = np.ones(core)
h1 = np.r_[xpad[::-1],xcore,xpad]
h2 = np.r_[ypad[::-1],ycore,ypad]
mesh = TensorMesh([h1, h2])
mesh.plotGrid()
plt.axis('tight')
plt.show()