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
3962799b
Commit
3962799b
authored
8 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
Fix field duplication in create_lb_update_rule. Fix API in legacy custom_code_nodes.
parent
7f6f3a57
No related branches found
No related tags found
1 merge request
!172
Changes for compatibility with pystencils 2.0
Pipeline
#69874
passed with warnings
8 months ago
Stage: pretest
Stage: test
Stage: prerelease
Stage: docs
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lbmpy/creationfunctions.py
+2
-11
2 additions, 11 deletions
src/lbmpy/creationfunctions.py
src/lbmpy/custom_code_nodes.py
+1
-1
1 addition, 1 deletion
src/lbmpy/custom_code_nodes.py
with
3 additions
and
12 deletions
src/lbmpy/creationfunctions.py
+
2
−
11
View file @
3962799b
...
...
@@ -626,18 +626,9 @@ def create_lb_update_rule(collision_rule=None, lbm_config=None, lbm_optimisation
if
lbm_optimisation
.
symbolic_temporary_field
is
not
None
:
dst_field
=
lbm_optimisation
.
symbolic_temporary_field
# else:
# FIXME: Field duplication is currently broken in pystencils.
# dst_field = src_field.new_field_with_different_name(lbm_config.temporary_field_name)
elif
src_field
.
has_fixed_shape
:
field_size
=
src_field
.
shape
dst_field
=
Field
.
create_fixed_size
(
lbm_config
.
temporary_field_name
,
field_size
,
index_dimensions
=
1
,
layout
=
lbm_optimisation
.
field_layout
,
dtype
=
fallback_field_data_type
)
else
:
dst_field
=
Field
.
create_generic
(
lbm_config
.
temporary_field_name
,
spatial_dimensions
=
collision_rule
.
method
.
dim
,
index_shape
=
(
q
,),
layout
=
lbm_optimisation
.
field_layout
,
dtype
=
fallback_field_data_type
)
dst_field
=
src_field
.
new_field_with_different_name
(
lbm_config
.
temporary_field_name
)
kernel_type
=
lbm_config
.
kernel_type
if
kernel_type
==
'
stream_pull_only
'
:
update_rule
=
create_stream_pull_with_output_kernel
(
lb_method
,
src_field
,
dst_field
,
lbm_config
.
output
)
...
...
This diff is collapsed.
Click to expand it.
src/lbmpy/custom_code_nodes.py
+
1
−
1
View file @
3962799b
...
...
@@ -56,7 +56,7 @@ class MirroredStencilDirections(CustomCodeNode):
def
__init__
(
self
,
stencil
,
mirror_axis
,
dtype
=
np
.
int32
):
offsets_dtype
=
create_type
(
dtype
)
mirrored_stencil_symbol
=
MirroredStencilDirections
.
_mirrored_symbol
(
mirror_axis
)
mirrored_stencil_symbol
=
MirroredStencilDirections
.
_mirrored_symbol
(
mirror_axis
,
stencil
)
mirrored_directions
=
[
stencil
.
index
(
MirroredStencilDirections
.
mirror_stencil
(
direction
,
mirror_axis
))
for
direction
in
stencil
]
code
=
"
\n
"
...
...
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