From 2eda907a8dce3f3c9924f12b4f3d014dcc0f2467 Mon Sep 17 00:00:00 2001 From: Martin Bauer <martin.bauer@fau.de> Date: Thu, 11 Jul 2019 16:23:19 +0200 Subject: [PATCH] Test for smagorinsky output field --- lbmpy_walberla_tests/test_walberla_codegen.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lbmpy_walberla_tests/test_walberla_codegen.py b/lbmpy_walberla_tests/test_walberla_codegen.py index 99ef2b2..9346075 100644 --- a/lbmpy_walberla_tests/test_walberla_codegen.py +++ b/lbmpy_walberla_tests/test_walberla_codegen.py @@ -61,3 +61,16 @@ class WalberlaLbmpyCodegenTest(unittest.TestCase): lb_method = create_lb_method(stencil='D3Q19', method='srt', relaxation_rates=[omega], compressible=False) generate_lattice_model(ctx, 'Model', lb_method, update_rule_params={'compressible': False}) assert 'static const bool compressible = false;' in ctx.files['Model.h'] + + @staticmethod + def test_output_field(): + with ManualCodeGenerationContext(openmp=True, double_accuracy=True) as ctx: + omega_field = ps.fields("omega_out: [3D]", layout='fzyx') + parameters = { + 'stencil': 'D3Q19', + 'method': 'trt', + 'smagorinsky': True, + 'omega_output_field': omega_field, + } + lb_method = create_lb_method(**parameters) + generate_lattice_model(ctx, 'Model', lb_method, update_rule_params=parameters) -- GitLab