aboutsummaryrefslogtreecommitdiff
path: root/lid_driven_cavity/cpp
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-11-02 17:57:23 +0100
committerAdrian Kummerlaender2019-11-02 17:57:23 +0100
commitb708361bf722b2c19f47699ceb931c6efeb8c9d9 (patch)
treebc23429a7915aaea020df70f159eabc992cdb7f8 /lid_driven_cavity/cpp
parentd540b701836dbcdef727947f52a0ca01430968a6 (diff)
downloadboltzgen_examples-b708361bf722b2c19f47699ceb931c6efeb8c9d9.tar
boltzgen_examples-b708361bf722b2c19f47699ceb931c6efeb8c9d9.tar.gz
boltzgen_examples-b708361bf722b2c19f47699ceb931c6efeb8c9d9.tar.bz2
boltzgen_examples-b708361bf722b2c19f47699ceb931c6efeb8c9d9.tar.lz
boltzgen_examples-b708361bf722b2c19f47699ceb931c6efeb8c9d9.tar.xz
boltzgen_examples-b708361bf722b2c19f47699ceb931c6efeb8c9d9.tar.zst
boltzgen_examples-b708361bf722b2c19f47699ceb931c6efeb8c9d9.zip
Adapt to upstream changes
Diffstat (limited to 'lid_driven_cavity/cpp')
-rw-r--r--lid_driven_cavity/cpp/config.py4
-rwxr-xr-xlid_driven_cavity/cpp/generate.py17
2 files changed, 9 insertions, 12 deletions
diff --git a/lid_driven_cavity/cpp/config.py b/lid_driven_cavity/cpp/config.py
index 3ed8bd5..2759ebf 100644
--- a/lid_driven_cavity/cpp/config.py
+++ b/lid_driven_cavity/cpp/config.py
@@ -1,8 +1,8 @@
-from boltzgen.lbm.model import *
+from boltzgen.lbm.lattice import *
from boltzgen import Geometry
descriptor = D2Q9
-geometry = Geometry(512, 512)
+geometry = Geometry(256, 256)
tau = 0.52
precision = 'single'
diff --git a/lid_driven_cavity/cpp/generate.py b/lid_driven_cavity/cpp/generate.py
index 4222e98..27c7997 100755
--- a/lid_driven_cavity/cpp/generate.py
+++ b/lid_driven_cavity/cpp/generate.py
@@ -2,8 +2,8 @@
import argparse
-from boltzgen import LBM, Generator, Geometry
-from boltzgen.lbm.model import D2Q9
+from boltzgen import Generator, Geometry
+from boltzgen.lbm.model import BGK
import config
@@ -14,15 +14,12 @@ argparser.add_argument(
args = argparser.parse_args()
-lbm = LBM(config.descriptor)
generator = Generator(
- descriptor = config.descriptor,
- moments = lbm.moments(),
- collision = lbm.bgk(f_eq = lbm.equilibrium(), tau = config.tau),
- target = 'cpp',
- precision = config.precision,
- index = 'XYZ',
- layout = 'AOS')
+ model = BGK(config.descriptor, tau = config.tau),
+ target = 'cpp',
+ precision = config.precision,
+ index = 'XYZ',
+ layout = 'AOS')
if args.output is None:
args.output = '.'