aboutsummaryrefslogtreecommitdiff
path: root/lid_driven_cavity/cpp
diff options
context:
space:
mode:
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 = '.'