diff --git a/tests/lbm/codegen/SrtWithForceFieldModel.gen.py b/tests/lbm/codegen/SrtWithForceFieldModel.gen.py index 2ecb139fbbba9d4562a6781441f2d929f9404086..f004d38404605dc00412da91fccd66876f9e28d2 100644 --- a/tests/lbm/codegen/SrtWithForceFieldModel.gen.py +++ b/tests/lbm/codegen/SrtWithForceFieldModel.gen.py @@ -1,34 +1,34 @@ import sympy as sp from lbmpy.boundaries import NoSlip, UBB -from lbmpy_walberla import Field, generateLatticeModelFiles, RefinementScaling -from lbmpy.creationfunctions import createLatticeBoltzmannMethod -from lbmpy_walberla.boundary import createBoundaryClass +from lbmpy_walberla import Field, generate_lattice_model_files, RefinementScaling +from lbmpy.creationfunctions import create_lb_method +from lbmpy_walberla.boundary import create_boundary_class from pystencils_walberla.cmake_integration import codegen +import pystencils as ps # ------------- Lattice Model ------------------------------ -forceField = Field.createGeneric('force', spatialDimensions=3, indexDimensions=1, layout='fzyx') -force = [forceField(0), forceField(1), forceField(2)] +force_field = ps.fields("force(3): [3D]", layout='fzyx') omega = sp.Symbol("omega") scaling = RefinementScaling() -scaling.addStandardRelaxationRateScaling(omega) -scaling.addForceScaling(forceField) +scaling.add_standard_relaxation_rate_scaling(omega) +scaling.add_force_scaling(force_field) -generateLatticeModelFiles(className='SrtWithForceFieldModel', - method='srt', stencil='D3Q19', forceModel='guo', force=force, - relaxationRates=[omega], refinementScaling=scaling) +generate_lattice_model_files(class_name='SrtWithForceFieldModel', + method='srt', stencil='D3Q19', force_model='guo', force=force_field.center_vector, + relaxation_rates=[omega], refinement_scaling=scaling) def genBoundary(): boundary = UBB([0.05, 0, 0], dim=3, name="MyUBB") - method = createLatticeBoltzmannMethod(stencil='D3Q19', method='srt') - return createBoundaryClass(boundary, method) + method = create_lb_method(stencil='D3Q19', method='srt') + return create_boundary_class(boundary, method) def genNoSlip(): boundary = NoSlip(name='MyNoSlip') - method = createLatticeBoltzmannMethod(stencil='D3Q19', method='srt') - return createBoundaryClass(boundary, method) + method = create_lb_method(stencil='D3Q19', method='srt') + return create_boundary_class(boundary, method) codegen.register(['MyUBB.h', 'MyUBB.cpp'], genBoundary) codegen.register(['MyNoSlip.h', 'MyNoSlip.cpp',], genNoSlip)