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
itischler
lbmpy
Commits
97dea9d0
Commit
97dea9d0
authored
Jul 21, 2021
by
itischler
Browse files
Fixed test on gpu
parent
3a71611a
Pipeline
#33337
passed with stages
in 19 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lbmpy_tests/test_shear_flow.py
View file @
97dea9d0
...
@@ -55,12 +55,12 @@ width = 40 # of box
...
@@ -55,12 +55,12 @@ width = 40 # of box
wall_thickness
=
2
wall_thickness
=
2
actual_width
=
width
-
wall_thickness
# subtract boundary layer from box width
actual_width
=
width
-
wall_thickness
# subtract boundary layer from box width
shear_velocity
=
0.2
# scale by width to keep stable
shear_velocity
=
0.2
# scale by width to keep stable
t_max
=
2000
0
t_max
=
2000
@
pytest
.
mark
.
parametrize
(
'target'
,
(
'cpu'
,
'gpu'
,
'opencl'
))
@
pytest
.
mark
.
parametrize
(
'target'
,
(
'cpu'
,
'gpu'
,
'opencl'
))
@
pytest
.
mark
.
parametrize
(
'stencil_name'
,
(
"D2Q9"
,
"D3Q19"
,))
@
pytest
.
mark
.
parametrize
(
'stencil_name'
,
(
"D2Q9"
,
"D3Q19"
,))
def
test_
poiseuille_channel
(
target
,
stencil_name
):
def
test_
shear_flow
(
target
,
stencil_name
):
# OpenCL and Cuda
# OpenCL and Cuda
if
target
==
'opencl'
:
if
target
==
'opencl'
:
import
pytest
import
pytest
...
@@ -118,7 +118,7 @@ def test_poiseuille_channel(target, stencil_name):
...
@@ -118,7 +118,7 @@ def test_poiseuille_channel(target, stencil_name):
getter_eqs
=
cqc
.
output_equations_from_pdfs
(
src
.
center_vector
,
getter_eqs
=
cqc
.
output_equations_from_pdfs
(
src
.
center_vector
,
{
'moment2'
:
p
})
{
'moment2'
:
p
})
kernel_compute_p
=
ps
.
create_kernel
(
getter_eqs
,
ghost_layers
=
0
).
compile
()
kernel_compute_p
=
ps
.
create_kernel
(
getter_eqs
,
**
opts
).
compile
()
# ## Set up the simulation
# ## Set up the simulation
...
...
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