Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Holzer
lbmpy
Commits
98c942d9
Commit
98c942d9
authored
Oct 28, 2021
by
Markus Holzer
Committed by
Helen Schottenhamml
Oct 28, 2021
Browse files
Fix longrun
parent
5bb23f94
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
98c942d9
...
...
@@ -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
doc/notebooks/00_tutorial_lbmpy_walberla_overview.ipynb
View file @
98c942d9
This diff is collapsed.
Click to expand it.
lbmpy/creationfunctions.py
View file @
98c942d9
...
...
@@ -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
...
...
lbmpy_tests/benchmark/test_benchmark.py
View file @
98c942d9
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
):
...
...
lbmpy_tests/test_force.py
View file @
98c942d9
...
...
@@ -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
=
Tru
e
,
force_model
=
force_model
,
force
=
tuple
(
F
))
compressible
=
compressibl
e
,
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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment