From b708361bf722b2c19f47699ceb931c6efeb8c9d9 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 2 Nov 2019 17:57:23 +0100 Subject: Adapt to upstream changes --- lid_driven_cavity/cpp/config.py | 4 ++-- lid_driven_cavity/cpp/generate.py | 17 +++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) (limited to 'lid_driven_cavity/cpp') 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 = '.' -- cgit v1.2.3