WARPXM v1.10.0
Loading...
Searching...
No Matches
examples.dg.mhd.fvm_plotter_test Namespace Reference

Variables

int maxslide = 1000
 
plt cmap = plt.cm.viridis
 
int divisions = 100
 
h5py f = h5py.File("data/gem_imhd_0.h5")
 
np rho = np.asarray(f["variables/fluid/rho/domain"]).flatten(order='C')
 
float minrho = 0.0
 
np maxrho = rho.max()
 
np coordinates = np.asarray(f["coordinates"])
 
np connectivity = np.asarray(f["connectivity"])
 
np elems = connectivity.shape[0]
 
np X = np.zeros((elems,3,3))
 
np x = X[:,:,0]
 
np y = X[:,:,1]
 
np xmax = np.max(np.max(x))
 
np xmin = np.min(np.min(x))
 
np ymax = np.max(np.max(y))
 
np ymin = np.min(np.min(y))
 
np Lx = xmax - xmin
 
np Ly = ymax - ymin
 
np xmid = np.zeros((elems,3))
 
tri triang = tri.Triangulation(x.flatten(),y.flatten())
 
np umid = np.zeros((elems))
 
np u = np.asarray(f["variables/fluid/rho/domain"])
 
int delta = 0
 
np ticklevels = np.linspace(0,maxrho,divisions)
 
plt tric = plt.tripcolor(coordinates[:,0],coordinates[:,1],connectivity,facecolors=umid,edgecolors='k',vmin=minrho-delta,vmax=maxrho+delta,cmap=cmap)
 
plt cbar = plt.colorbar()
 

Variable Documentation

◆ cbar

plt examples.dg.mhd.fvm_plotter_test.cbar = plt.colorbar()

◆ cmap

plt examples.dg.mhd.fvm_plotter_test.cmap = plt.cm.viridis

◆ connectivity

np examples.dg.mhd.fvm_plotter_test.connectivity = np.asarray(f["connectivity"])

◆ coordinates

np examples.dg.mhd.fvm_plotter_test.coordinates = np.asarray(f["coordinates"])

◆ delta

int examples.dg.mhd.fvm_plotter_test.delta = 0

◆ divisions

int examples.dg.mhd.fvm_plotter_test.divisions = 100

◆ elems

np examples.dg.mhd.fvm_plotter_test.elems = connectivity.shape[0]

◆ f

h5py examples.dg.mhd.fvm_plotter_test.f = h5py.File("data/gem_imhd_0.h5")

◆ Lx

np examples.dg.mhd.fvm_plotter_test.Lx = xmax - xmin

◆ Ly

np examples.dg.mhd.fvm_plotter_test.Ly = ymax - ymin

◆ maxrho

np examples.dg.mhd.fvm_plotter_test.maxrho = rho.max()

◆ maxslide

int examples.dg.mhd.fvm_plotter_test.maxslide = 1000

◆ minrho

np examples.dg.mhd.fvm_plotter_test.minrho = 0.0

◆ rho

np examples.dg.mhd.fvm_plotter_test.rho = np.asarray(f["variables/fluid/rho/domain"]).flatten(order='C')

◆ ticklevels

np examples.dg.mhd.fvm_plotter_test.ticklevels = np.linspace(0,maxrho,divisions)

◆ triang

tri examples.dg.mhd.fvm_plotter_test.triang = tri.Triangulation(x.flatten(),y.flatten())

◆ tric

plt examples.dg.mhd.fvm_plotter_test.tric = plt.tripcolor(coordinates[:,0],coordinates[:,1],connectivity,facecolors=umid,edgecolors='k',vmin=minrho-delta,vmax=maxrho+delta,cmap=cmap)

◆ u

np examples.dg.mhd.fvm_plotter_test.u = np.asarray(f["variables/fluid/rho/domain"])

◆ umid

np examples.dg.mhd.fvm_plotter_test.umid = np.zeros((elems))

◆ X

np examples.dg.mhd.fvm_plotter_test.X = np.zeros((elems,3,3))

◆ x

np examples.dg.mhd.fvm_plotter_test.x = X[:,:,0]

◆ xmax

np examples.dg.mhd.fvm_plotter_test.xmax = np.max(np.max(x))

◆ xmid

np examples.dg.mhd.fvm_plotter_test.xmid = np.zeros((elems,3))

◆ xmin

np examples.dg.mhd.fvm_plotter_test.xmin = np.min(np.min(x))

◆ y

np examples.dg.mhd.fvm_plotter_test.y = X[:,:,1]

◆ ymax

np examples.dg.mhd.fvm_plotter_test.ymax = np.max(np.max(y))

◆ ymin

np examples.dg.mhd.fvm_plotter_test.ymin = np.min(np.min(y))