diff --git a/lbmpy_tests/test_cpu_gpu_equivalence.py b/lbmpy_tests/test_cpu_gpu_equivalence.py index 8efa14781bf9abbf0ee81b1b4080ca4da5ac6e8f..66cf0477a2eff574e57ab28621c51a19b1d2cb2c 100644 --- a/lbmpy_tests/test_cpu_gpu_equivalence.py +++ b/lbmpy_tests/test_cpu_gpu_equivalence.py @@ -27,7 +27,7 @@ def test_force_driven_channel_short(): default = { 'scenario_creator': create_channel, 'domain_size': (32, 32), - 'relaxation_rates': [1.95, 1.9, 1.92], + 'relaxation_rates': [1.95, 1.9, 1.92, 1.92], 'method': 'mrt3', 'pressure_difference': 0.001, 'optimization': {}, @@ -36,7 +36,7 @@ def test_force_driven_channel_short(): # Different methods for ds, method, compressible, block_size, field_layout in [((17, 12), 'srt', False, (12, 4), 'reverse_numpy'), - ((18, 20), 'mrt3', True, (4, 2), 'zyxf'), + ((18, 20), 'mrt', True, (4, 2), 'zyxf'), ((7, 11, 18), 'trt', False, False, 'numpy')]: params = deepcopy(default) if block_size is not False: @@ -61,8 +61,8 @@ def test_force_driven_channel(): default = { 'scenario_creator': create_channel, 'domain_size': (32, 32), - 'relaxation_rates': [1.95, 1.9, 1.92], - 'method': 'mrt3', + 'relaxation_rates': [1.95, 1.9, 1.92, 1.92], + 'method': 'mrt', 'pressure_difference': 0.001, 'optimization': {}, } @@ -70,7 +70,7 @@ def test_force_driven_channel(): scenarios = [] # Different methods - for method in ('srt', 'mrt3'): + for method in ('srt', 'mrt'): for compressible in (True, False): params = deepcopy(default) params['optimization'].update({ @@ -83,7 +83,7 @@ def test_force_driven_channel(): # Blocked indexing with different block sizes for block_size in ((16, 16), (8, 16), (4, 2)): params = deepcopy(default) - params['method'] = 'mrt3' + params['method'] = 'mrt' params['compressible'] = True params['optimization'].update({ 'gpu_indexing': 'block', diff --git a/lbmpy_tests/test_momentbased_methods_equilibrium.py b/lbmpy_tests/test_momentbased_methods_equilibrium.py index 4dca8ab5963f5829a5ecf6ca0e1372790cd8062b..c19f9d9bfb71369eb2b7f28f04df46b0f144e8d7 100644 --- a/lbmpy_tests/test_momentbased_methods_equilibrium.py +++ b/lbmpy_tests/test_momentbased_methods_equilibrium.py @@ -47,13 +47,15 @@ def test_for_matching_equilibrium_for_stencil(stencil_name): def test_relaxation_rate_setter(): o1, o2, o3 = sp.symbols("o1 o2 o3") method = create_lb_method(method='srt', stencil='D2Q9', relaxation_rates=[o3]) - method2 = create_lb_method(method='mrt3', stencil='D2Q9', relaxation_rates=[o3, o3, o3]) + method2 = create_lb_method(method='mrt', stencil='D2Q9', relaxation_rates=[o3, o3, o3, o3]) + method3 = create_lb_method(method='mrt', stencil='D2Q9', relaxation_rates=[o3, o3, o3, o3], entropic=True) method.set_zeroth_moment_relaxation_rate(o1) method.set_first_moment_relaxation_rate(o2) assert get_shear_relaxation_rate(method) == o3 method.set_zeroth_moment_relaxation_rate(o3) method.set_first_moment_relaxation_rate(o3) - assert method.collision_matrix == method2.collision_matrix + method2.set_conserved_moments_relaxation_rate(o3) + assert method.collision_matrix == method2.collision_matrix == method3.collision_matrix def test_mrt_orthogonal():