Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
lbmpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
a77fa3a6
Commit
a77fa3a6
authored
5 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
removed mrt3 from test cases
parent
4dcd5ffd
No related branches found
No related tags found
1 merge request
!31
Remove mrt3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lbmpy_tests/test_cpu_gpu_equivalence.py
+6
-6
6 additions, 6 deletions
lbmpy_tests/test_cpu_gpu_equivalence.py
lbmpy_tests/test_momentbased_methods_equilibrium.py
+4
-2
4 additions, 2 deletions
lbmpy_tests/test_momentbased_methods_equilibrium.py
with
10 additions
and
8 deletions
lbmpy_tests/test_cpu_gpu_equivalence.py
+
6
−
6
View file @
a77fa3a6
...
@@ -27,7 +27,7 @@ def test_force_driven_channel_short():
...
@@ -27,7 +27,7 @@ def test_force_driven_channel_short():
default
=
{
default
=
{
'
scenario_creator
'
:
create_channel
,
'
scenario_creator
'
:
create_channel
,
'
domain_size
'
:
(
32
,
32
),
'
domain_size
'
:
(
32
,
32
),
'
relaxation_rates
'
:
[
1.95
,
1.9
,
1.92
],
'
relaxation_rates
'
:
[
1.95
,
1.9
,
1.92
,
1.92
],
'
method
'
:
'
mrt3
'
,
'
method
'
:
'
mrt3
'
,
'
pressure_difference
'
:
0.001
,
'
pressure_difference
'
:
0.001
,
'
optimization
'
:
{},
'
optimization
'
:
{},
...
@@ -36,7 +36,7 @@ def test_force_driven_channel_short():
...
@@ -36,7 +36,7 @@ def test_force_driven_channel_short():
# Different methods
# Different methods
for
ds
,
method
,
compressible
,
block_size
,
field_layout
in
[((
17
,
12
),
'
srt
'
,
False
,
(
12
,
4
),
'
reverse_numpy
'
),
for
ds
,
method
,
compressible
,
block_size
,
field_layout
in
[((
17
,
12
),
'
srt
'
,
False
,
(
12
,
4
),
'
reverse_numpy
'
),
((
18
,
20
),
'
mrt
3
'
,
True
,
(
4
,
2
),
'
zyxf
'
),
((
18
,
20
),
'
mrt
'
,
True
,
(
4
,
2
),
'
zyxf
'
),
((
7
,
11
,
18
),
'
trt
'
,
False
,
False
,
'
numpy
'
)]:
((
7
,
11
,
18
),
'
trt
'
,
False
,
False
,
'
numpy
'
)]:
params
=
deepcopy
(
default
)
params
=
deepcopy
(
default
)
if
block_size
is
not
False
:
if
block_size
is
not
False
:
...
@@ -61,8 +61,8 @@ def test_force_driven_channel():
...
@@ -61,8 +61,8 @@ def test_force_driven_channel():
default
=
{
default
=
{
'
scenario_creator
'
:
create_channel
,
'
scenario_creator
'
:
create_channel
,
'
domain_size
'
:
(
32
,
32
),
'
domain_size
'
:
(
32
,
32
),
'
relaxation_rates
'
:
[
1.95
,
1.9
,
1.92
],
'
relaxation_rates
'
:
[
1.95
,
1.9
,
1.92
,
1.92
],
'
method
'
:
'
mrt
3
'
,
'
method
'
:
'
mrt
'
,
'
pressure_difference
'
:
0.001
,
'
pressure_difference
'
:
0.001
,
'
optimization
'
:
{},
'
optimization
'
:
{},
}
}
...
@@ -70,7 +70,7 @@ def test_force_driven_channel():
...
@@ -70,7 +70,7 @@ def test_force_driven_channel():
scenarios
=
[]
scenarios
=
[]
# Different methods
# Different methods
for
method
in
(
'
srt
'
,
'
mrt
3
'
):
for
method
in
(
'
srt
'
,
'
mrt
'
):
for
compressible
in
(
True
,
False
):
for
compressible
in
(
True
,
False
):
params
=
deepcopy
(
default
)
params
=
deepcopy
(
default
)
params
[
'
optimization
'
].
update
({
params
[
'
optimization
'
].
update
({
...
@@ -83,7 +83,7 @@ def test_force_driven_channel():
...
@@ -83,7 +83,7 @@ def test_force_driven_channel():
# Blocked indexing with different block sizes
# Blocked indexing with different block sizes
for
block_size
in
((
16
,
16
),
(
8
,
16
),
(
4
,
2
)):
for
block_size
in
((
16
,
16
),
(
8
,
16
),
(
4
,
2
)):
params
=
deepcopy
(
default
)
params
=
deepcopy
(
default
)
params
[
'
method
'
]
=
'
mrt
3
'
params
[
'
method
'
]
=
'
mrt
'
params
[
'
compressible
'
]
=
True
params
[
'
compressible
'
]
=
True
params
[
'
optimization
'
].
update
({
params
[
'
optimization
'
].
update
({
'
gpu_indexing
'
:
'
block
'
,
'
gpu_indexing
'
:
'
block
'
,
...
...
This diff is collapsed.
Click to expand it.
lbmpy_tests/test_momentbased_methods_equilibrium.py
+
4
−
2
View file @
a77fa3a6
...
@@ -47,13 +47,15 @@ def test_for_matching_equilibrium_for_stencil(stencil_name):
...
@@ -47,13 +47,15 @@ def test_for_matching_equilibrium_for_stencil(stencil_name):
def
test_relaxation_rate_setter
():
def
test_relaxation_rate_setter
():
o1
,
o2
,
o3
=
sp
.
symbols
(
"
o1 o2 o3
"
)
o1
,
o2
,
o3
=
sp
.
symbols
(
"
o1 o2 o3
"
)
method
=
create_lb_method
(
method
=
'
srt
'
,
stencil
=
'
D2Q9
'
,
relaxation_rates
=
[
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_zeroth_moment_relaxation_rate
(
o1
)
method
.
set_first_moment_relaxation_rate
(
o2
)
method
.
set_first_moment_relaxation_rate
(
o2
)
assert
get_shear_relaxation_rate
(
method
)
==
o3
assert
get_shear_relaxation_rate
(
method
)
==
o3
method
.
set_zeroth_moment_relaxation_rate
(
o3
)
method
.
set_zeroth_moment_relaxation_rate
(
o3
)
method
.
set_first_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
():
def
test_mrt_orthogonal
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment