From d71faec93ec0a55c46810e0d178b2803ee89130c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 15 Jun 2019 20:45:27 +0200 Subject: Add support for generating a D3Q19 kernel Note how this basically required no changes besides generalizing cell indexing and adding the symbolic formulation of a D3Q19 BGK collision step. Increasing the neighborhood communication from 9 to 19 cells leads to a significant performance "regression": The 3D kernel yields ~ 360 MLUPS compared to the 2D version's ~ 820 MLUPS. --- implosion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'implosion.py') diff --git a/implosion.py b/implosion.py index 90b1d55..05f3644 100644 --- a/implosion.py +++ b/implosion.py @@ -22,7 +22,7 @@ def generate_moment_plots(lattice, moments): plt.figure(figsize=(10, 10)) plt.imshow(velocity, origin='lower', cmap=plt.get_cmap('seismic')) - plt.savefig("result/implosion_" + str(i) + ".png", bbox_inches='tight', pad_inches=0) + plt.savefig("result/implosion_%02d.png" % i, bbox_inches='tight', pad_inches=0) def box(geometry, x, y): if x == 1 or y == 1 or x == geometry.size_x-2 or y == geometry.size_y-2: -- cgit v1.2.3