WARPXM v1.10.0
|
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() |
plt examples.dg.mhd.fvm_plotter_test.cbar = plt.colorbar() |
plt examples.dg.mhd.fvm_plotter_test.cmap = plt.cm.viridis |
np examples.dg.mhd.fvm_plotter_test.connectivity = np.asarray(f["connectivity"]) |
np examples.dg.mhd.fvm_plotter_test.coordinates = np.asarray(f["coordinates"]) |
int examples.dg.mhd.fvm_plotter_test.delta = 0 |
int examples.dg.mhd.fvm_plotter_test.divisions = 100 |
np examples.dg.mhd.fvm_plotter_test.elems = connectivity.shape[0] |
h5py examples.dg.mhd.fvm_plotter_test.f = h5py.File("data/gem_imhd_0.h5") |
np examples.dg.mhd.fvm_plotter_test.maxrho = rho.max() |
int examples.dg.mhd.fvm_plotter_test.maxslide = 1000 |
np examples.dg.mhd.fvm_plotter_test.minrho = 0.0 |
np examples.dg.mhd.fvm_plotter_test.rho = np.asarray(f["variables/fluid/rho/domain"]).flatten(order='C') |
tri examples.dg.mhd.fvm_plotter_test.triang = tri.Triangulation(x.flatten(),y.flatten()) |
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) |
np examples.dg.mhd.fvm_plotter_test.umid = np.zeros((elems)) |
np examples.dg.mhd.fvm_plotter_test.X = np.zeros((elems,3,3)) |
np examples.dg.mhd.fvm_plotter_test.x = X[:,:,0] |
np examples.dg.mhd.fvm_plotter_test.xmax = np.max(np.max(x)) |
np examples.dg.mhd.fvm_plotter_test.xmid = np.zeros((elems,3)) |
np examples.dg.mhd.fvm_plotter_test.xmin = np.min(np.min(x)) |
np examples.dg.mhd.fvm_plotter_test.y = X[:,:,1] |
np examples.dg.mhd.fvm_plotter_test.ymax = np.max(np.max(y)) |
np examples.dg.mhd.fvm_plotter_test.ymin = np.min(np.min(y)) |