Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Frederik Hennig
lbmpy
Commits
06124196
Commit
06124196
authored
Oct 07, 2020
by
Frederik Hennig
Browse files
to satisfy the flake8 linter
parent
06aeddba
Pipeline
#27124
passed with stage
in 17 minutes and 16 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
lbmpy/advanced_streaming/communication.py
View file @
06124196
...
...
@@ -51,7 +51,8 @@ def _fix_length_one_slices(slices):
return
tuple
(
_fix_length_one_slices
(
s
)
for
s
in
slices
)
def
get_communication_slices
(
stencil
,
comm_stencil
=
None
,
streaming_pattern
=
'pull'
,
after_timestep
=
'both'
,
ghost_layers
=
1
):
def
get_communication_slices
(
stencil
,
comm_stencil
=
None
,
streaming_pattern
=
'pull'
,
after_timestep
=
'both'
,
ghost_layers
=
1
):
"""
Return the source and destination slices for periodicity handling or communication between blocks.
...
...
lbmpy/advanced_streaming/utility.py
View file @
06124196
...
...
@@ -39,12 +39,14 @@ def get_accessor(streaming_pattern, timestep) -> PdfFieldAccessor:
else
:
return
odd_accessors
[
streaming_pattern
]
def
is_inplace
(
streaming_pattern
):
if
streaming_pattern
not
in
streaming_patterns
:
raise
ValueError
(
'Invalid streaming pattern'
,
streaming_pattern
)
return
streaming_pattern
in
[
'aa'
,
'esotwist'
]
def
numeric_offsets
(
field_access
:
ps
.
Field
.
Access
):
return
tuple
(
int
(
o
)
for
o
in
field_access
.
offsets
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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