Skip to content
Snippets Groups Projects
Commit 98c942d9 authored by Markus Holzer's avatar Markus Holzer Committed by Helen Schottenhamml
Browse files

Fix longrun

parent 5bb23f94
No related branches found
No related tags found
1 merge request!101Fix longrun
......@@ -19,4 +19,7 @@ doc/bibtex.json
/lbmpy/phasefield/simplex_projection.c
# macOS
**/.DS_Store
\ No newline at end of file
**/.DS_Store
# benchmark database
/lbmpy_tests/benchmark/db
\ No newline at end of file
......@@ -669,6 +669,13 @@ def create_lb_method(lbm_config=None, **params):
else:
raise ValueError("Failed to create LB method. Please use lbmpy.enums.Method for the creation")
# >>Entropic methods can only be created for methods with two relaxation rates One free relaxation rate
# determining the viscosity and one to be determined by the entropy condition<<
# Thus we fix the conserved quantities to one of the relaxation rates because zero would be recognised as
# a third relaxation rate here.
if lbm_config.entropic:
method.set_conserved_moments_relaxation_rate(relaxation_rates[0])
return method
......
from statistics import median
import numpy as np
import pytest
import sympy as sp
from lbmpy.scenarios import create_lid_driven_cavity
......@@ -228,11 +227,11 @@ def study_block_sizes_trt(study):
study.add_run(params, weight=ds[0] // domain_sizes[0][0])
@pytest.mark.longrun
def test_run():
"""Called by test suite - ensures that benchmark can be run"""
s = ParameterStudy(run)
study_optimization_options(s, domain_sizes=((17, 23), (19, 17, 18))).run()
# @pytest.mark.longrun
# def test_run():
# """Called by test suite - ensures that benchmark can be run"""
# s = ParameterStudy(run)
# study_optimization_options(s, domain_sizes=((17, 23), (19, 17, 18))).run()
def study_compiler_flags(study):
......
......@@ -296,7 +296,7 @@ def test_modes_central_moment_longrun(stencil, force_model, compressible):
F = list(sp.symbols(f"F_:{stencil.D}"))
lbm_config = LBMConfig(method=Method.CENTRAL_MOMENT, stencil=stencil, relaxation_rate=omega_s,
compressible=True, force_model=force_model, force=tuple(F))
compressible=compressible, force_model=force_model, force=tuple(F))
method = create_lb_method(lbm_config=lbm_config)
subs_dict = method.subs_dict_relxation_rate
......@@ -307,7 +307,7 @@ def test_modes_central_moment_longrun(stencil, force_model, compressible):
assert force_moments[0] == 0
# The momentum moments should contain the force
assert list(force_moments[1:stencil.Q + 1]) == F
assert list(force_moments[1:stencil.D + 1]) == F
def _check_modes(stencil, force_model, compressible):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment