Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
7474ec19
Commit
7474ec19
authored
5 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
[bugfix] Prevent double visit of sum/product children
parent
8c4d996a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/dune/codegen/ufl/visitor.py
+2
-2
2 additions, 2 deletions
python/dune/codegen/ufl/visitor.py
with
2 additions
and
2 deletions
python/dune/codegen/ufl/visitor.py
+
2
−
2
View file @
7474ec19
...
...
@@ -282,7 +282,7 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker):
ops
=
tuple
(
self
.
call
(
op
)
for
op
in
o
.
ufl_operands
)
if
all
(
isinstance
(
op
,
(
int
,
float
))
for
op
in
ops
):
return
ptproduct
(
ops
)
return
prim
.
flattened_product
(
tuple
(
self
.
call
(
op
)
for
op
in
o
.
ufl_operand
s
)
)
return
prim
.
flattened_product
(
op
s
)
def
float_value
(
self
,
o
):
return
o
.
value
()
...
...
@@ -297,7 +297,7 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker):
ops
=
tuple
(
self
.
call
(
op
)
for
op
in
o
.
ufl_operands
)
if
all
(
isinstance
(
op
,
(
int
,
float
))
for
op
in
ops
):
return
sum
(
ops
)
return
prim
.
flattened_sum
(
tuple
(
self
.
call
(
op
)
for
op
in
o
.
ufl_operand
s
)
)
return
prim
.
flattened_sum
(
op
s
)
def
zero
(
self
,
o
):
# UFL has Zeroes with shape. We ignore those indices.
...
...
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