From 2046e1329f522eeafb0f979a97eb91adeebb7a14 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 13 Jun 2019 18:08:14 +0200 Subject: Add kernel customization point for velocity boundaries --- implosion.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'implosion.py') diff --git a/implosion.py b/implosion.py index d2754c2..e5e87bc 100644 --- a/implosion.py +++ b/implosion.py @@ -42,6 +42,13 @@ pop_eq = """ % endfor }""" +boundary = """ + if ( m == 2 ) { + u_0 = 0.0; + u_1 = 0.0; + } +""" + nUpdates = 2000 nStat = 100 @@ -49,7 +56,7 @@ moments = [] print("Initializing simulation...\n") -lattice = Lattice(nX = 1024, nY = 1024, tau = 0.8, geometry = box, pop_eq_src = pop_eq) +lattice = Lattice(nX = 1024, nY = 1024, tau = 0.8, geometry = box, pop_eq_src = pop_eq, boundary_src = boundary) print("Starting simulation using %d cells...\n" % lattice.nCells) -- cgit v1.2.3