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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
lbmpy
Commits
56fd08b4
Commit
56fd08b4
authored
Nov 8, 2020
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
Removed obsolete function `transformed_boundary_rule` and updated creationfunctions doc comment.
parent
39d171b3
No related branches found
No related tags found
1 merge request
!40
Advanced Streaming Extensions
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lbmpy/boundaries/boundaries_in_kernel.py
+0
-28
0 additions, 28 deletions
lbmpy/boundaries/boundaries_in_kernel.py
lbmpy/creationfunctions.py
+9
-2
9 additions, 2 deletions
lbmpy/creationfunctions.py
with
9 additions
and
30 deletions
lbmpy/boundaries/boundaries_in_kernel.py
+
0
−
28
View file @
56fd08b4
...
...
@@ -7,7 +7,6 @@ from pystencils.boundaries.boundaryhandling import BoundaryOffsetInfo
from
pystencils.assignment
import
Assignment
from
pystencils.astnodes
import
Block
,
Conditional
,
LoopOverCoordinate
,
SympyAssignment
from
pystencils.data_types
import
type_all_numbers
from
pystencils.field
import
Field
from
pystencils.simp.assignment_collection
import
AssignmentCollection
from
pystencils.simp.simplifications
import
sympy_cse_on_assignment_list
from
pystencils.stencil
import
inverse_direction
...
...
@@ -58,33 +57,6 @@ def border_conditions(direction, field, ghost_layers=1):
result
=
sp
.
And
(
border_condition
,
*
other_min
,
*
other_max
)
return
type_all_numbers
(
result
,
loop_ctr
.
dtype
)
# TODO: Function is called nowhere... remove it?
def
transformed_boundary_rule
(
boundary
,
accessor_func
,
field
,
direction_symbol
,
lb_method
,
**
kwargs
):
tmp_field
=
field
.
new_field_with_different_name
(
"
t
"
)
rule
=
boundary
(
tmp_field
,
direction_symbol
,
lb_method
,
**
kwargs
)
bsubs
=
boundary_substitutions
(
lb_method
)
rule
=
[
a
.
subs
(
bsubs
)
for
a
in
rule
]
accessor_writes
=
accessor_func
(
tmp_field
,
lb_method
.
stencil
)
to_replace
=
set
()
for
assignment
in
rule
:
to_replace
.
update
({
fa
for
fa
in
assignment
.
rhs
.
atoms
(
Field
.
Access
)
if
fa
.
field
==
tmp_field
})
def
compute_replacement
(
fa
):
f
=
fa
.
index
[
0
]
shift
=
accessor_writes
[
f
].
offsets
new_index
=
tuple
(
a
+
b
for
a
,
b
in
zip
(
fa
.
offsets
,
shift
))
return
field
[
new_index
](
accessor_writes
[
f
].
index
[
0
])
substitutions
=
{
fa
:
compute_replacement
(
fa
)
for
fa
in
to_replace
}
all_assignments
=
[
assignment
.
subs
(
substitutions
)
for
assignment
in
rule
]
main_assignments
=
[
a
for
a
in
all_assignments
if
isinstance
(
a
.
lhs
,
Field
.
Access
)]
sub_expressions
=
[
a
for
a
in
all_assignments
if
not
isinstance
(
a
.
lhs
,
Field
.
Access
)]
assert
len
(
main_assignments
)
==
1
ac
=
AssignmentCollection
(
main_assignments
,
sub_expressions
).
new_without_subexpressions
()
return
ac
.
main_assignments
[
0
].
rhs
def
boundary_conditional
(
boundary
,
direction
,
streaming_pattern
,
prev_timestep
,
lb_method
,
output_field
,
cse
=
False
):
stencil
=
lb_method
.
stencil
...
...
This diff is collapsed.
Click to expand it.
lbmpy/creationfunctions.py
+
9
−
2
View file @
56fd08b4
...
...
@@ -57,8 +57,15 @@ General:
- ``velocity_input``: symbolic field where the velocities are read from (for advection diffusion LBM)
- ``density_input``: symbolic field or field access where to read density from. When passing this parameter,
``velocity_input`` has to be passed as well
- ``kernel_type``: supported values:
'
stream_pull_collide
'
(default),
'
collide_only
'
, stream_pull_only,
collide_stream_push, esotwist_even, esotwist_odd, aa_even, aa_odd
- ``kernel_type``: supported values:
'
default_stream_collide
'
(default),
'
collide_only
'
,
'
stream_pull_only
'
.
With
'
default_stream_collide
'
, streaming pattern and even/odd time-step (for in-place patterns) can be specified
by the ``streaming_pattern`` and ``timestep`` arguments. For backwards compatibility, ``kernel_type`` also accepts
'
stream_pull_collide
'
,
'
collide_stream_push
'
,
'
esotwist_even
'
,
'
esotwist_odd
'
,
'
aa_even
'
and
'
aa_odd
'
for selection
of the streaming pattern.
- ``streaming_pattern``: The streaming pattern to be used with a
'
default_stream_collide
'
kernel. Accepted values are
'
pull
'
,
'
push
'
,
'
aa
'
and
'
esotwist
'
.
- ``timestep``: Timestep modulus for the streaming pattern. For two-fields patterns, this argument is irrelevant and
by default set to ``Timestep.BOTH``. For in-place patterns, ``Timestep.EVEN`` or ``Timestep.ODD`` must be speficied.
Entropic methods:
...
...
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
sign in
to comment