mirror of
https://github.com/wassname/simpeg.git
synced 2026-09-09 11:34:26 +08:00
Merge branch 'develop' of https://github.com/simpeg/simpeg into boundaryConditions
This commit is contained in:
@@ -245,7 +245,7 @@ class TensorView(object):
|
|||||||
ax=None, clim=None, showIt=False,
|
ax=None, clim=None, showIt=False,
|
||||||
gridOpts={'color':'k'}
|
gridOpts={'color':'k'}
|
||||||
):
|
):
|
||||||
viewOpts = ['real','imag','abs','vec','|vec|']
|
viewOpts = ['real','imag','abs','vec']
|
||||||
normalOpts = ['X', 'Y', 'Z']
|
normalOpts = ['X', 'Y', 'Z']
|
||||||
vTypeOpts = ['CC','F','E']
|
vTypeOpts = ['CC','F','E']
|
||||||
|
|
||||||
@@ -260,11 +260,6 @@ class TensorView(object):
|
|||||||
if ind is None: ind = int(szSliceDim/2)
|
if ind is None: ind = int(szSliceDim/2)
|
||||||
assert type(ind) in [int, long], 'ind must be an integer'
|
assert type(ind) in [int, long], 'ind must be an integer'
|
||||||
|
|
||||||
normalizeVector = False
|
|
||||||
if view == '|vec|':
|
|
||||||
view = 'vec'
|
|
||||||
normalizeVector = True
|
|
||||||
|
|
||||||
if ax is None:
|
if ax is None:
|
||||||
fig = plt.figure(1)
|
fig = plt.figure(1)
|
||||||
fig.clf()
|
fig.clf()
|
||||||
@@ -315,10 +310,7 @@ class TensorView(object):
|
|||||||
if clim is None:
|
if clim is None:
|
||||||
clim = [v.min(),v.max()]
|
clim = [v.min(),v.max()]
|
||||||
out += (ax.pcolormesh(tM.vectorNx, tM.vectorNy, 0.5*(U+V).T, vmin=clim[0], vmax=clim[1]),)
|
out += (ax.pcolormesh(tM.vectorNx, tM.vectorNy, 0.5*(U+V).T, vmin=clim[0], vmax=clim[1]),)
|
||||||
if normalizeVector:
|
out += (plt.streamplot(tM.vectorCCx, tM.vectorCCy, U.T, V.T),)
|
||||||
length = np.sqrt(U**2+V**2)
|
|
||||||
U, V = U/length, V/length
|
|
||||||
out += (plt.quiver( tM.gridCC[:,0], tM.gridCC[:,1], U, V),)
|
|
||||||
|
|
||||||
if grid:
|
if grid:
|
||||||
xXGrid = np.c_[tM.vectorNx,tM.vectorNx,np.nan*np.ones(tM.nNx)].flatten()
|
xXGrid = np.c_[tM.vectorNx,tM.vectorNx,np.nan*np.ones(tM.nNx)].flatten()
|
||||||
|
|||||||
Reference in New Issue
Block a user