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
42697a8c
Commit
42697a8c
authored
4 years ago
by
Michael Kuron
Browse files
Options
Downloads
Plain Diff
Merge branch 'type_boundary' into 'master'
Use int64 for indexing Closes
#18
See merge request
!84
parents
55d0ca6c
5068abc0
No related branches found
No related tags found
1 merge request
!84
Use int64 for indexing
Pipeline
#32525
passed
4 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lbmpy/advanced_streaming/indexing.py
+2
-2
2 additions, 2 deletions
lbmpy/advanced_streaming/indexing.py
lbmpy/boundaries/boundaryhandling.py
+1
-3
1 addition, 3 deletions
lbmpy/boundaries/boundaryhandling.py
with
3 additions
and
5 deletions
lbmpy/advanced_streaming/indexing.py
+
2
−
2
View file @
42697a8c
...
...
@@ -40,7 +40,7 @@ class BetweenTimestepsIndexing:
# =============================
def
__init__
(
self
,
pdf_field
,
stencil
,
prev_timestep
=
Timestep
.
BOTH
,
streaming_pattern
=
'
pull
'
,
index_dtype
=
np
.
int
32
,
offsets_dtype
=
np
.
int
32
):
index_dtype
=
np
.
int
64
,
offsets_dtype
=
np
.
int
64
):
if
prev_timestep
==
Timestep
.
BOTH
and
is_inplace
(
streaming_pattern
):
raise
ValueError
(
'
Cannot create index arrays for both kinds of timesteps for inplace streaming pattern
'
+
streaming_pattern
)
...
...
@@ -219,7 +219,7 @@ class NeighbourOffsetArrays(CustomCodeNode):
def
_offset_symbols
(
dim
):
return
[
TypedSymbol
(
f
"
neighbour_offset_
{
d
}
"
,
create_type
(
np
.
int64
))
for
d
in
[
'
x
'
,
'
y
'
,
'
z
'
][:
dim
]]
def
__init__
(
self
,
stencil
,
offsets_dtype
=
np
.
int
32
):
def
__init__
(
self
,
stencil
,
offsets_dtype
=
np
.
int
64
):
offsets_dtype
=
create_type
(
offsets_dtype
)
dim
=
len
(
stencil
[
0
])
...
...
This diff is collapsed.
Click to expand it.
lbmpy/boundaries/boundaryhandling.py
+
1
−
3
View file @
42697a8c
...
...
@@ -177,10 +177,8 @@ def create_lattice_boltzmann_boundary_kernel(pdf_field, index_field, lb_method,
prev_timestep
=
Timestep
.
BOTH
,
streaming_pattern
=
'
pull
'
,
target
=
'
cpu
'
,
**
kernel_creation_args
):
index_dtype
=
index_field
.
dtype
.
numpy_dtype
.
fields
[
'
dir
'
][
0
]
offsets_dtype
=
index_field
.
dtype
.
numpy_dtype
.
fields
[
'
x
'
][
0
]
indexing
=
BetweenTimestepsIndexing
(
pdf_field
,
lb_method
.
stencil
,
prev_timestep
,
streaming_pattern
,
index_dtype
,
offsets_dtype
)
pdf_field
,
lb_method
.
stencil
,
prev_timestep
,
streaming_pattern
,
np
.
int64
,
np
.
int64
)
f_out
,
f_in
=
indexing
.
proxy_fields
dir_symbol
=
indexing
.
dir_symbol
...
...
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