Added a missing switch to stencil_assembly.sas.

This commit is contained in:
Miikka Vaisala
2019-06-24 18:03:24 +08:00
parent 55ecdd0ac8
commit 59043e586b
4 changed files with 24 additions and 27 deletions

View File

@@ -1,4 +1,7 @@
#define LUPWD (0)
Preprocessed Scalar
value(in Scalar vertex)
{
@@ -13,6 +16,8 @@ gradient(in Scalar vertex)
derz(vertexIdx, vertex)};
}
#if LUPWD
Preprocessed Scalar
der6x_upwd(in Scalar vertex)
{
@@ -49,6 +54,8 @@ der6z_upwd(in Scalar vertex)
+ vertex[vertexIdx.x, vertexIdx.y, vertexIdx.z+3] + vertex[vertexIdx.x, vertexIdx.y, vertexIdx.z-3])};
}
#endif
Preprocessed Matrix
hessian(in Scalar vertex)
{

View File

@@ -3,7 +3,7 @@
#define LTEMPERATURE (0)
#define LGRAVITY (0)
#define LFORCING (1)
#define LUPWD (1)
#define LUPWD (0)
// Declare uniforms (i.e. device constants)

View File

@@ -33,7 +33,8 @@
"metadata": {},
"outputs": [],
"source": [
"imesh = 10000\n",
"#imesh = 16000\n",
"imesh = 30000\n",
"mesh = ad.read.Mesh(imesh, fdir=meshdir)"
]
},
@@ -72,7 +73,10 @@
"vis.slices.plot_3(mesh, mesh.uu[0], title = r'$u_x$')\n",
"vis.slices.plot_3(mesh, mesh.uu[1], title = r'$u_y$')\n",
"vis.slices.plot_3(mesh, mesh.uu[2], title = r'$u_z$')\n",
"vis.slices.plot_3(mesh, mesh.lnrho, title = r'$\\ln_\\rho$')"
"vis.slices.plot_3(mesh, mesh.lnrho, title = r'$\\ln_\\rho$')\n",
"vis.slices.plot_3(mesh, np.exp(mesh.lnrho), title = r'$\\rho$')\n",
"vis.slices.plot_3(mesh, np.exp(mesh.lnrho), title = r'$N_\\mathrm{col}$', slicetype = 'sum')\n",
"#vis.slices.plot_3(mesh, mesh.entropy, title = r'$s$')\n"
]
},
{
@@ -97,23 +101,9 @@
"metadata": {},
"outputs": [],
"source": [
"vis.lineplot.plot_ts(ts, lnrho=1, uutot=1, uux=1, ss=1)"
"vis.lineplot.plot_ts(ts, lnrho=1, uutot=1, uux=1, uuy=1, ss=1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,

View File

@@ -169,8 +169,8 @@ if '1d' in sys.argv:
if 'sl' in sys.argv:
#maxfiles = 200002
#stride = 10000
maxfiles = 5001
stride = 100
maxfiles = 50001
stride = 500
for i in range(0, maxfiles, stride):
mesh = ad.read.Mesh(i, fdir=meshdir)
print(" %i / %i" % (i, maxfiles))
@@ -178,13 +178,13 @@ if 'sl' in sys.argv:
uu_tot = np.sqrt(mesh.uu[0]**2.0 + mesh.uu[1]**2.0 + mesh.uu[2]**2.0)
if 'lim' in sys.argv:
vis.slices.plot_3(mesh, mesh.lnrho, title = r'$\ln \rho$', bitmap = True, fname = 'lnrho', colrange=[-0.02, 0.0])
vis.slices.plot_3(mesh, np.exp(mesh.lnrho), title = r'$\rho$', bitmap = True, fname = 'rho', colrange=[0.97, 1.0])
vis.slices.plot_3(mesh, mesh.uu[0], title = r'$u_x$', bitmap = True, fname = 'uux', colrange=[-0.002, 0.002])
vis.slices.plot_3(mesh, mesh.uu[1], title = r'$u_y$', bitmap = True, fname = 'uuy', colrange=[-1.0e-20, 1.0e-20])
vis.slices.plot_3(mesh, mesh.uu[2], title = r'$u_z$', bitmap = True, fname = 'uuz', colrange=[-0.002, 0.002])
vis.slices.plot_3(mesh, np.exp(mesh.lnrho), title = r'$N_\mathrm{col}$', bitmap = True, fname = 'colden', slicetype = 'sum', colrange=[0.0, 100.0])
vis.slices.plot_3(mesh, uu_tot, title = r'$|u|$', bitmap = True, fname = 'uutot', colrange=[0.00, 0.004])
vis.slices.plot_3(mesh, mesh.lnrho, title = r'$\ln \rho$', bitmap = True, fname = 'lnrho', colrange=[0.7, 1.15])
vis.slices.plot_3(mesh, np.exp(mesh.lnrho), title = r'$\rho$', bitmap = True, fname = 'rho', colrange=[2.0, 4.0])
vis.slices.plot_3(mesh, mesh.uu[0], title = r'$u_x$', bitmap = True, fname = 'uux', colrange=[-1.00, 1.00])
vis.slices.plot_3(mesh, mesh.uu[1], title = r'$u_y$', bitmap = True, fname = 'uuy', colrange=[-1.00, 1.00])
vis.slices.plot_3(mesh, mesh.uu[2], title = r'$u_z$', bitmap = True, fname = 'uuz', colrange=[-1.00, 1.00])
vis.slices.plot_3(mesh, np.exp(mesh.lnrho), title = r'$N_\mathrm{col}$', bitmap = True, fname = 'colden', slicetype = 'sum', colrange=[330.0, 395.0])
vis.slices.plot_3(mesh, uu_tot, title = r'$|u|$', bitmap = True, fname = 'uutot', colrange=[0.00, 1.2])
else:
vis.slices.plot_3(mesh, mesh.lnrho, title = r'$\ln \rho$', bitmap = True, fname = 'lnrho')
vis.slices.plot_3(mesh, np.exp(mesh.lnrho), title = r'$\rho$', bitmap = True, fname = 'rho')