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
32778a93
Commit
32778a93
authored
1 year ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Fix pipeline
parent
242f1c78
No related branches found
No related tags found
1 merge request
!167
[BugFix] Segfault LBStep
Pipeline
#65426
passed
1 year ago
Stage: pretest
Stage: test
Changes
3
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/notebooks/02_tutorial_boundary_setup.ipynb
+15
-24
15 additions, 24 deletions
doc/notebooks/02_tutorial_boundary_setup.ipynb
tests/test_cpu_gpu_equivalence.py
+5
-2
5 additions, 2 deletions
tests/test_cpu_gpu_equivalence.py
tests/test_float_kernel.py
+4
-2
4 additions, 2 deletions
tests/test_float_kernel.py
with
24 additions
and
28 deletions
doc/notebooks/02_tutorial_boundary_setup.ipynb
+
15
−
24
View file @
32778a93
This diff is collapsed.
Click to expand it.
tests/test_cpu_gpu_equivalence.py
+
5
−
2
View file @
32778a93
...
@@ -5,8 +5,9 @@ import pytest
...
@@ -5,8 +5,9 @@ import pytest
from
pystencils
import
Backend
,
Target
,
CreateKernelConfig
from
pystencils
import
Backend
,
Target
,
CreateKernelConfig
from
lbmpy.creationfunctions
import
LBMConfig
,
LBMOptimisation
from
lbmpy.creationfunctions
import
LBMConfig
,
LBMOptimisation
from
lbmpy.enums
import
Method
,
Stencil
from
lbmpy.scenarios
import
create_channel
from
lbmpy.scenarios
import
create_channel
from
lbmpy.
enum
s
import
Method
from
lbmpy.
stencil
s
import
LBStencil
def
run_equivalence_test
(
domain_size
,
lbm_config
,
lbm_opt
,
config
,
time_steps
=
13
):
def
run_equivalence_test
(
domain_size
,
lbm_config
,
lbm_opt
,
config
,
time_steps
=
13
):
...
@@ -33,12 +34,14 @@ def run_equivalence_test(domain_size, lbm_config, lbm_opt, config, time_steps=13
...
@@ -33,12 +34,14 @@ def run_equivalence_test(domain_size, lbm_config, lbm_opt, config, time_steps=13
def
test_force_driven_channel_short
(
scenario
):
def
test_force_driven_channel_short
(
scenario
):
pytest
.
importorskip
(
"
cupy
"
)
pytest
.
importorskip
(
"
cupy
"
)
ds
=
scenario
[
0
]
ds
=
scenario
[
0
]
stencil
=
LBStencil
(
Stencil
.
D2Q9
)
if
len
(
ds
)
==
2
else
LBStencil
(
Stencil
.
D3Q27
)
method
=
scenario
[
1
]
method
=
scenario
[
1
]
compressible
=
scenario
[
2
]
compressible
=
scenario
[
2
]
block_size
=
scenario
[
3
]
block_size
=
scenario
[
3
]
field_layout
=
scenario
[
4
]
field_layout
=
scenario
[
4
]
lbm_config
=
LBMConfig
(
method
=
method
,
compressible
=
compressible
,
relaxation_rates
=
[
1.95
,
1.9
,
1.92
,
1.92
])
lbm_config
=
LBMConfig
(
stencil
=
stencil
,
method
=
method
,
compressible
=
compressible
,
relaxation_rates
=
[
1.95
,
1.9
,
1.92
,
1.92
])
lbm_opt
=
LBMOptimisation
(
field_layout
=
field_layout
)
lbm_opt
=
LBMOptimisation
(
field_layout
=
field_layout
)
# Different methods
# Different methods
...
...
This diff is collapsed.
Click to expand it.
tests/test_float_kernel.py
+
4
−
2
View file @
32778a93
...
@@ -3,8 +3,9 @@ import pytest
...
@@ -3,8 +3,9 @@ import pytest
import
pystencils
as
ps
import
pystencils
as
ps
from
lbmpy.creationfunctions
import
create_lb_function
,
LBMConfig
from
lbmpy.creationfunctions
import
create_lb_function
,
LBMConfig
from
lbmpy.enums
import
Method
from
lbmpy.enums
import
Method
,
Stencil
from
lbmpy.scenarios
import
create_lid_driven_cavity
from
lbmpy.scenarios
import
create_lid_driven_cavity
from
lbmpy.stencils
import
LBStencil
@pytest.mark.parametrize
(
'
double_precision
'
,
[
False
,
True
])
@pytest.mark.parametrize
(
'
double_precision
'
,
[
False
,
True
])
...
@@ -28,7 +29,8 @@ def test_creation(double_precision, method_enum):
...
@@ -28,7 +29,8 @@ def test_creation(double_precision, method_enum):
@pytest.mark.parametrize
(
'
double_precision
'
,
[
False
,
True
])
@pytest.mark.parametrize
(
'
double_precision
'
,
[
False
,
True
])
@pytest.mark.parametrize
(
'
method_enum
'
,
[
Method
.
SRT
,
Method
.
CENTRAL_MOMENT
,
Method
.
CUMULANT
])
@pytest.mark.parametrize
(
'
method_enum
'
,
[
Method
.
SRT
,
Method
.
CENTRAL_MOMENT
,
Method
.
CUMULANT
])
def
test_scenario
(
method_enum
,
double_precision
):
def
test_scenario
(
method_enum
,
double_precision
):
lbm_config
=
LBMConfig
(
method
=
method_enum
,
relaxation_rate
=
1.45
,
compressible
=
True
)
lbm_config
=
LBMConfig
(
stencil
=
LBStencil
(
Stencil
.
D3Q27
),
method
=
method_enum
,
relaxation_rate
=
1.45
,
compressible
=
True
)
config
=
ps
.
CreateKernelConfig
(
data_type
=
"
float64
"
if
double_precision
else
"
float32
"
,
config
=
ps
.
CreateKernelConfig
(
data_type
=
"
float64
"
if
double_precision
else
"
float32
"
,
default_number_float
=
"
float64
"
if
double_precision
else
"
float32
"
)
default_number_float
=
"
float64
"
if
double_precision
else
"
float32
"
)
sc
=
create_lid_driven_cavity
((
16
,
16
,
8
),
lbm_config
=
lbm_config
,
config
=
config
)
sc
=
create_lid_driven_cavity
((
16
,
16
,
8
),
lbm_config
=
lbm_config
,
config
=
config
)
...
...
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