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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Alexander Reinauer
lbmpy
Commits
b65cd3ec
Commit
b65cd3ec
authored
6 years ago
by
Martin Bauer
Browse files
Options
Downloads
Patches
Plain Diff
walberla coupling modules are tested as well
parent
904ab784
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lbmpy_tests/test_boundary_indexlist_creation.py
+36
-0
36 additions, 0 deletions
lbmpy_tests/test_boundary_indexlist_creation.py
with
36 additions
and
0 deletions
lbmpy_tests/test_boundary_indexlist_creation.py
+
36
−
0
View file @
b65cd3ec
...
@@ -37,3 +37,39 @@ def test_equivalence_cython_python_version():
...
@@ -37,3 +37,39 @@ def test_equivalence_cython_python_version():
np
.
testing
.
assert_equal
(
result_python_2d
,
result_cython_2d
)
np
.
testing
.
assert_equal
(
result_python_2d
,
result_cython_2d
)
np
.
testing
.
assert_equal
(
result_python_3d
,
result_cython_3d
)
np
.
testing
.
assert_equal
(
result_python_3d
,
result_cython_3d
)
def
test_equivalence_cell_idx_list_cython_python_version
():
if
not
cil
.
cython_funcs_available
:
return
stencil_2d
=
get_stencil
(
"
D2Q9
"
)
stencil_3d
=
get_stencil
(
"
D3Q19
"
)
for
dtype
in
[
int
,
np
.
int16
,
np
.
uint32
]:
fluid_mask
=
dtype
(
1
)
mask
=
dtype
(
2
)
flag_field_2d
=
np
.
ones
([
15
,
16
],
dtype
=
dtype
)
*
fluid_mask
flag_field_3d
=
np
.
ones
([
15
,
16
,
17
],
dtype
=
dtype
)
*
fluid_mask
flag_field_2d
[
0
,
:]
=
mask
flag_field_2d
[
-
1
,
:]
=
mask
flag_field_2d
[
7
,
7
]
=
mask
flag_field_3d
[
0
,
:,
:]
=
mask
flag_field_3d
[
-
1
,
:,
:]
=
mask
flag_field_3d
[
7
,
7
,
7
]
=
mask
result_python_2d
=
cil
.
_create_boundary_cell_index_list_python
(
flag_field_2d
,
mask
,
fluid_mask
,
stencil_2d
,
False
)
result_python_3d
=
cil
.
_create_boundary_cell_index_list_python
(
flag_field_3d
,
mask
,
fluid_mask
,
stencil_3d
,
False
)
result_cython_2d
=
cil
.
create_boundary_index_list
(
flag_field_2d
,
stencil_2d
,
mask
,
fluid_mask
,
None
,
False
,
False
)
result_cython_3d
=
cil
.
create_boundary_index_list
(
flag_field_3d
,
stencil_3d
,
mask
,
fluid_mask
,
None
,
False
,
False
)
np
.
testing
.
assert_equal
(
result_python_2d
,
result_cython_2d
)
np
.
testing
.
assert_equal
(
result_python_3d
,
result_cython_3d
)
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