aboutsummaryrefslogtreecommitdiff
path: root/codegen_lbm.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-06-10 15:38:17 +0200
committerAdrian Kummerlaender2019-06-10 15:38:17 +0200
commiteac7769abf1ea05d78c525d38f15613d93fae925 (patch)
treeb7c3c5eeaecb8383a7862e64f0c4efe2a71ec222 /codegen_lbm.py
parent7490aa8e933f2403fa23d1f35ac6f7d1c05e95d9 (diff)
downloadsymlbm_playground-eac7769abf1ea05d78c525d38f15613d93fae925.tar
symlbm_playground-eac7769abf1ea05d78c525d38f15613d93fae925.tar.gz
symlbm_playground-eac7769abf1ea05d78c525d38f15613d93fae925.tar.bz2
symlbm_playground-eac7769abf1ea05d78c525d38f15613d93fae925.tar.lz
symlbm_playground-eac7769abf1ea05d78c525d38f15613d93fae925.tar.xz
symlbm_playground-eac7769abf1ea05d78c525d38f15613d93fae925.tar.zst
symlbm_playground-eac7769abf1ea05d78c525d38f15613d93fae925.zip
Improve plot output
Diffstat (limited to 'codegen_lbm.py')
-rw-r--r--codegen_lbm.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/codegen_lbm.py b/codegen_lbm.py
index 8e7b0a7..29c2dad 100644
--- a/codegen_lbm.py
+++ b/codegen_lbm.py
@@ -189,8 +189,9 @@ class D2Q9_BGK_Lattice:
for x in range(1,self.nX-1):
density[y-1,x-1] = self.np_moments[0,self.idx(x,y)]
+ plt.figure(figsize=(10, 10))
plt.imshow(density, vmin=0.2, vmax=2.0, cmap=plt.get_cmap("seismic"))
- plt.savefig("result/density_" + str(i) + ".png")
+ plt.savefig("result/density_" + str(i) + ".png", bbox_inches='tight', pad_inches=0)
def MLUPS(cells, steps, time):