Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Markus Holzer
lbmpy
Commits
edcba10d
Commit
edcba10d
authored
Oct 28, 2021
by
Helen Schottenhamml
Browse files
Merge branch 'Fix_Longrun' into 'master'
Fix longrun See merge request
pycodegen/lbmpy!101
parents
5bb23f94
98c942d9
Pipeline
#35176
passed with stages
in 63 minutes and 21 seconds
Changes
5
Pipelines
2
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
edcba10d
...
...
@@ -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 @
edcba10d
This diff is collapsed.
Click to expand it.
lbmpy/creationfunctions.py
View file @
edcba10d
...
...
@@ -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 @
edcba10d
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 @
edcba10d
...
...
@@ -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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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