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
1d4b8285
Commit
1d4b8285
authored
4 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Add pull as default accessor
parent
c21c12b8
No related branches found
No related tags found
1 merge request
!74
Generalize stream only kernel
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lbmpy/updatekernels.py
+2
-5
2 additions, 5 deletions
lbmpy/updatekernels.py
with
2 additions
and
5 deletions
lbmpy/updatekernels.py
+
2
−
5
View file @
1d4b8285
...
...
@@ -56,7 +56,8 @@ def create_lbm_kernel(collision_rule, input_field, output_field, accessor):
def
create_stream_only_kernel
(
stencil
,
numpy_arr
=
None
,
src_field_name
=
"
src
"
,
dst_field_name
=
"
dst
"
,
generic_layout
=
'
numpy
'
,
generic_field_type
=
np
.
float64
,
accessor
=
None
):
generic_layout
=
'
numpy
'
,
generic_field_type
=
np
.
float64
,
accessor
=
StreamPullTwoFieldsAccessor
()):
"""
Creates a stream kernel, without collision.
Args:
...
...
@@ -72,10 +73,6 @@ def create_stream_only_kernel(stencil, numpy_arr=None, src_field_name="src", dst
Returns:
AssignmentCollection of the stream only update rule
"""
if
accessor
is
None
:
accessor
=
StreamPullTwoFieldsAccessor
()
dim
=
len
(
stencil
[
0
])
if
numpy_arr
is
None
:
src
=
Field
.
create_generic
(
src_field_name
,
dim
,
index_shape
=
(
len
(
stencil
),),
...
...
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