aboutsummaryrefslogtreecommitdiff
path: root/boltzgen.py
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-11-05 19:57:17 +0100
committerAdrian Kummerlaender2019-11-05 19:57:17 +0100
commit02cb01c94fe26d425371ab74feeb50e8a9bf6bf6 (patch)
treeacfbca6533a1a8d9c22afac9f4be14bf08bb9c63 /boltzgen.py
parent78f5edec8151db38ebf933e915fcca5f65b1cad5 (diff)
downloadboltzgen-02cb01c94fe26d425371ab74feeb50e8a9bf6bf6.tar
boltzgen-02cb01c94fe26d425371ab74feeb50e8a9bf6bf6.tar.gz
boltzgen-02cb01c94fe26d425371ab74feeb50e8a9bf6bf6.tar.bz2
boltzgen-02cb01c94fe26d425371ab74feeb50e8a9bf6bf6.tar.lz
boltzgen-02cb01c94fe26d425371ab74feeb50e8a9bf6bf6.tar.xz
boltzgen-02cb01c94fe26d425371ab74feeb50e8a9bf6bf6.tar.zst
boltzgen-02cb01c94fe26d425371ab74feeb50e8a9bf6bf6.zip
Implement AA pattern for C++ target
Note that special care has to be taken to provide ghost cells around active cells so the algorithm has somewhere to stream to and from. This is also the case for the AB pattern but there they only have to be equilibrilized once instead of after every other time step. Even when such an equilibrilization is performed there is still a potential bug as inbound populations at the outer boundary are never streamed to (this is not a problem for AB using pull-only streaming). A vectorizable solution may require direction-specific ghost cell equilibrization.
Diffstat (limited to 'boltzgen.py')
-rwxr-xr-xboltzgen.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/boltzgen.py b/boltzgen.py
index 57b3ed0..216234f 100755
--- a/boltzgen.py
+++ b/boltzgen.py
@@ -10,9 +10,10 @@ argparser.add_argument('target', help = 'Target language (currently either "cl"
argparser.add_argument('--lattice', required = True, help = 'Lattice type ("D2Q9", "D3Q7", "D3Q19", "D3Q27")')
argparser.add_argument('--model', required = False, help = 'LBM model (currently only "BGK")')
+argparser.add_argument('--precision', required = True, help = 'Floating precision ("single" or "double")')
argparser.add_argument('--layout', required = True, help = 'Memory layout ("AOS" or "SOA")')
argparser.add_argument('--index', required = False, help = 'Cell indexing ("XYZ" or "ZYX")')
-argparser.add_argument('--precision', required = True, help = 'Floating precision ("single" or "double")')
+argparser.add_argument('--streaming', required = True, help = 'Streaming pattern ("AB" or "AA")')
argparser.add_argument('--geometry', required = True, help = 'Size of the block geometry ("x:y(:z)")')
argparser.add_argument('--tau', required = True, help = 'BGK relaxation time')
@@ -42,6 +43,7 @@ generator = Generator(
model = model(lattice, tau = float(args.tau), optimize = not args.disable_cse),
target = args.target,
precision = args.precision,
+ streaming = args.streaming,
index = args.index,
layout = args.layout)